block: fix memory leak in __blkdev_issue_zero_pages
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 memory leak in __blkdev_issue_zero_pages
Move the fatal signal check before bio_alloc() to prevent a memory leak when BLKDEV_ZERO_KILLABLE is set and a fatal signal is pending.
Previously, the bio was allocated before checking for a fatal signal. If a signal was pending, the code would break out of the loop without freeing or chaining the just-allocated bio, causing a memory leak.
This matches the pattern already used in __blkdev_issue_write_zeroes() where the signal check precedes the allocation.
From the CVE record · Linux
The Linux kernel can leak an allocated bio in __blkdev_issue_zero_pages when BLKDEV_ZERO_KILLABLE is set and a fatal signal is pending. The input does not establish whether an attacker can trigger this condition, or specify network access, authentication, or user-interaction requirements.
Engineers running the Linux kernel should check their systems; affected versions are not specified.