block: Fix iterating over an empty bio with bio_for_each_folio_all
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
block: Fix iterating over an empty bio with bio_for_each_folio_all
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().
[axboe: add unlikely() to error case]
From the CVE record · Linux
The Linux kernel's block code can dereference a NULL pointer when iterating over a bio that contains no data, causing a kernel oops. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.