OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32452a3
)
io_uring: check that data field is 0 in ringfd unregister
author
Eugene Syromiatnikov
<esyr@redhat.com>
Fri, 29 Apr 2022 14:22:18 +0000
(16:22 +0200)
committer
Jens Axboe
<axboe@kernel.dk>
Fri, 29 Apr 2022 14:39:43 +0000
(08:39 -0600)
Only allow data field to be 0 in struct io_uring_rsrc_update user
arguments to allow for future possible usage.
Fixes:
e7a6c00dc77a
("io_uring: add support for registering ring file descriptors")
Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Link:
https://lore.kernel.org/r/20220429142218.GA28696@asgard.redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index
e3ae26f
..
e01f595
100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-10593,7
+10593,7
@@
static int io_ringfd_unregister(struct io_ring_ctx *ctx, void __user *__arg,
ret = -EFAULT;
break;
}
- if (reg.resv || reg.offset >= IO_RINGFD_REG_MAX) {
+ if (reg.resv || reg.
data || reg.
offset >= IO_RINGFD_REG_MAX) {
ret = -EINVAL;
break;
}