Repository navigation
Conversation
|
Upstream branch: ba285ed Pull request is NOT updated. Failed to apply https://patchwork.kernel.org/series/1154388/ conflict: |
|
Upstream branch: ba285ed |
45050f3 to
11d803e
Compare
|
Upstream branch: dd660a0 |
11d803e to
aa5df9e
Compare
d7f8d66 to
60818a6
Compare
|
Upstream branch: 9dcbf66 |
aa5df9e to
977bf06
Compare
A cqe32 entry spans two CQ array slots, so the last CQ array slot can't
contain a cqe32 entry. If the CQ tail points at the last CQ array slot
and the kernel wants to write a cqe32 entry, it uses io_fill_nop_cqe()
to pad the last CQ array slot with a dummy entry and make the tail wrap
around.
However, malicious userspace can directly set IORING_CQE_F_32 on the
last CQ array slot, causing __io_uring_show_fdinfo() to read the second
cqe32 half from beyond the CQ array. Change __io_uring_show_fdinfo() to
explicitly ignore the IORING_CQE_F_32 flag in this case.
This is not a real bugfix, just tightening the code a bit, because:
1. the number of CQE slots is always a power of 2, see
io_uring_fill_params
2. the ring_region region consists of:
- a 64-byte header
- pow(2, N) CQE slots (each 0x10 bytes)
- optionally, the SQ array
3. the ring_region size must be page-aligned because it is shared memory
Together, these properties imply that the last CQE slot can't be close
before the end of a page, so the "out-of-bounds" data is in memory that
is anyway accessible to userspace.
Reported-by: Dominik Maier <[email protected]>
Fixes: 82ceb7f ("io_uring/fdinfo: handle mixed sized CQEs")
Cc: [email protected] # no impact due to memory layout
Reviewed-by: Gabriel Krisman Bertazi <[email protected]>
Signed-off-by: Jann Horn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
60818a6 to
ddf8681
Compare
|
Upstream branch: ab5dc9d |
977bf06 to
030c5d2
Compare
ddf8681 to
1ec6755
Compare
|
Upstream branch: ab5dc9d |
030c5d2 to
f2bd7ab
Compare
* io_uring-7.3: io_uring/fdinfo: ignore IORING_CQE_F_32 in last CQ array slot
* block-7.3: blk-cgroup: save IRQ state in blkg_tryget_closest()
* for-7.4/io_uring: nvme/ioctl: call io_uring_cmd_set_res32() in ->end_io() io_uring/cmd: split io_uring_cmd_set_res() from io_uring_cmd_done() io_uring: move req_set_*() to public header
* for-7.4/block: block: only use REQ_FUA for direct writes if the device supports it block: skip redundant flush for O_DSYNC direct writes block: improve aligning down bios in bio_iov_iter_bounce_write block: cap atomic write size by PI buffer size constraints block: avoid integer overflows in max_integrity_io_size block: store GPT attributes as a raw value
* for-7.4/lazy-bounce-buffering:
block,iomap: remove the old read side bounce buffering support
xfs: log a message at mount time when using integrity protection
xfs: add error injection for lazy bounce buffering
xfs: add support for lazy direct read bounce buffering
iomap,xfs: move integrity verification to the file system
xfs: use BIO_COMPLETE_IN_TASK for bounce buffered read I/Os
iomap: better read bounce buffering support
block,iomap: fix protection information verification with initial bvec offset
xfs: move PI generation into xfs_submit_zoned_bio
iomap,xfs: move T10 PI handling for direct I/O into ->submit_io
iomap: add a IOMAP_IOEND_INTEGRITY flag
iomap: add a iomap_ioend_flags helper
iomap: respect maximum I/O size in iomap_dio_bio_iter_one
block: warn on too larger integrity allocations
block: pass a maxlen argument to bio_iov_iter_get_pages
block: add a bio_prepare_reissue helper
block: export fs_bio_integrity_{alloc,free}
block: split bio_iov_iter_bounce_write
* io_uring-exit-cancel.7: io_uring: wait for in-flight requests on ring release io_uring: drop registered files and buffers at release time io_uring: run cancelations synchronously on ring release io_uring/cancel: cancel and wait for all requests on process exit io_uring/notif: count pending zerocopy notifications per ring io_uring/uring_cmd: only cancel requests of the given task io_uring: put request files before posting the completions io_uring/rw: don't reap io-wq IOPOLL completions while io-wq has a reference io_uring: post io-wq completions from the last request reference io_uring/io-wq: put the request file before posting a completion
1ec6755 to
e2fca12
Compare
|
Upstream branch: 4953f86 |
f2bd7ab to
92d7aad
Compare
* for-7.4/block: block: simplify disk_zone_set_cond() block: allow read-only and offline conventional zones block: fail zone management operations to read-only and offline zones block: always treat offline and read-only zones as dead block: propagate readonly and offline conditions to zone write plugs block: retry zone revalidation on capacity change block: drop all zone write plugs on capacity changes block: serialize zone revalidation block: introduce disk_for_all_zone_wplugs() block: improve blkdev_get_zone_info() block: refactor bdev_zone_is_seq() block: remember a zone type regardless of its condition block: refactor disk_update_zone_resources() block: refactor disk_revalidate_zone_resources() block: improve capacity handling during zone revalidation block: remove disk_free_zone_resources() block: cap atomic write size by PI buffer size constraints block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc
e2fca12 to
5196e4c
Compare
|
Upstream branch: 2dd9768 |
92d7aad to
9224c9b
Compare
* block-7.3: selftests: ublk: fix unused_result error
5196e4c to
f96be02
Compare
|
Upstream branch: 0f54ee1 |
9224c9b to
9fa1416
Compare
f96be02 to
4afe92f
Compare
The kerneldoc of loop_set_size() points readers at loop_validate_size(), which does not exist in the tree. Drop the reference. Signed-off-by: Tao Cui <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
simple_strtol() is deprecated and swallows errors. Use kstrtoint() in the max_loop setup code; an invalid option keeps the default and now says so. Only mark max_loop_specified when the option was parsed successfully. With simple_strtol() a garbage string yields max_loop = 0, and loop_probe()'s "max_loop_specified && max_loop" check short-circuits on 0, so legacy autoloading is not capped. Keeping max_loop at its default while still setting max_loop_specified would instead turn the default into a hard upper bound for dynamic device creation. This mirrors what max_loop_param_set_int() already does for the module parameter. Signed-off-by: Tao Cui <[email protected]>
lo_req_flush() never uses its request argument. Drop it. Signed-off-by: Tao Cui <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
|
Upstream branch: 0f54ee1 |
9fa1416 to
b5e2dc9
Compare
4afe92f to
e8cd04d
Compare
|
Upstream branch: a3b346d |
1 similar comment
|
Upstream branch: a3b346d |
|
Github failed to update this PR after force push. Close it. |
Pull request for series with
subject: loop: three small cleanups
version: 1
url: https://patchwork.kernel.org/series/1154388/