mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
nvme: reject invalid pr_read_keys() num_keys values
[ Upstream commit38ec8469f3] The pr_read_keys() interface has a u32 num_keys parameter. The NVMe Reservation Report command has a u32 maximum length. Reject num_keys values that are too large to fit. This will become important when pr_read_keys() is exposed to untrusted userspace via an <linux/pr.h> ioctl. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Stable-dep-of:c332015376("nvme: fix memory allocation in nvme_pr_read_keys()") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
05e3f01974
commit
76f327fa4f
1 changed files with 5 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue