linux-stable/include
Matthew Wilcox (Oracle) c6350b5cb7 block: Fix iterating over an empty bio with bio_for_each_folio_all
commit 7bed6f3d08 upstream.

If the bio contains no data, bio_first_folio() calls page_folio() on a
NULL pointer and oopses.  Move the test that we've reached the end of
the bio from bio_next_folio() to bio_first_folio().

Reported-by: syzbot+8b23309d5788a79d3eea@syzkaller.appspotmail.com
Reported-by: syzbot+004c1e0fced2b4bc3dcc@syzkaller.appspotmail.com
Fixes: 640d1930be ("block: Add bio_for_each_folio_all()")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20240116212959.3413014-1-willy@infradead.org
[axboe: add unlikely() to error case]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-25 15:27:42 -08:00
..
acpi
asm-generic asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation 2023-12-20 17:00:24 +01:00
clocksource
crypto crypto: af_alg - Disallow multiple in-flight AIO requests 2024-01-25 15:27:21 -08:00
drm drm/bridge: Fix typo in post_disable() description 2024-01-25 15:27:32 -08:00
dt-bindings dt-bindings: clock: Update the videocc resets for sm8150 2024-01-25 15:27:36 -08:00
keys
kunit
kvm
linux block: Fix iterating over an empty bio with bio_for_each_folio_all 2024-01-25 15:27:42 -08:00
math-emu
media
memory
misc
net Bluetooth: Fix bogus check for re-auth no supported with non-ssp 2024-01-25 15:27:30 -08:00
pcmcia
ras
rdma RDMA/core: Fix umem iterator when PAGE_SIZE is greater then HCA pgsz 2023-12-13 18:39:15 +01:00
rv
scsi
soc
sound
target
trace 9p: prevent read overrun in protocol dump tracepoint 2024-01-01 12:39:05 +00:00
uapi bpf: Add crosstask check to __bpf_get_stack 2024-01-25 15:27:24 -08:00
ufs
vdso
video
xen