hfs/hfsplus: zero-initialize buffer in hfs_bnode_read
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ a431930c9bac518bf99d6b1da526a7f37ddee8d8 · < f3461b84a4865d9b5e70fbb71da72ae044a3bcd2| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
hfs/hfsplus: zero-initialize buffer in hfs_bnode_read
hfs_bnode_read() can return early without writing to the output buffer when is_bnode_offset_valid() fails or when check_and_correct_requested_ length() corrects the length to zero. Callers such as hfs_bnode_read_ u16() and hfs_bnode_read_u8() pass stack-allocated buffers and use the result unconditionally, leading to KMSAN uninit-value reports.
Rather than initializing at each individual call site, zero the buffer at the start of hfs_bnode_read() before any validation checks. This ensures all callers in both hfs and hfsplus get a deterministic zero value regardless of which early-return path is taken.
From the CVE record · Linux
In the Linux kernel, hfs_bnode_read() can return without writing to its output buffer when offset validation fails or the requested length is corrected to zero. Callers can then use uninitialized stack values, producing KMSAN reports. The input does not establish attacker access requirements or user interaction.
Engineers running Linux kernels with hfs or hfsplus support should check their kernel versions; affected versions are not specified.