Skip to content

Commit cc60937

Browse files
Yi Xieaxboe
authored andcommitted
io_uring/fs: check unused sqe fields for unlinkat
Zero check unused SQE fields addr3 and pad2 for unlinkat. They're not needed now, but could be used sometime in the future. Signed-off-by: Yi Xie <xieyi@kylinos.cn> Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Link: https://patch.msgid.link/20260714030306.64820-1-xieyi@kylinos.cn Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent f1596ba commit cc60937

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

io_uring/fs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ int io_unlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
110110
const char __user *fname;
111111
int err;
112112

113-
if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in)
113+
if (sqe->off || sqe->len || sqe->buf_index || sqe->splice_fd_in ||
114+
sqe->addr3 || sqe->__pad2[0])
114115
return -EINVAL;
115116
if (unlikely(req->flags & REQ_F_FIXED_FILE))
116117
return -EBADF;

0 commit comments

Comments
 (0)