ext4: fix iloc.bh leak in ext4_fc_replay_inode() error paths
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8016e29f4362e285f0f7e38fadc61a5b7bdfdfa2 · < f7817ad399d604e8639005d87d148b5ec626ad26| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ext4: fix iloc.bh leak in ext4_fc_replay_inode() error paths
During code review, Joseph found that ext4_fc_replay_inode() calls ext4_get_fc_inode_loc() to get the inode location, which holds a reference to iloc.bh that must be released via brelse().
However, several error paths jump to the 'out' label without releasing iloc.bh:
- ext4_handle_dirty_metadata() failure - sync_dirty_buffer() failure - ext4_mark_inode_used() failure - ext4_iget() failure
Fix this by introducing an 'out_brelse' label placed just before the existing 'out' label to ensure iloc.bh is always released.
Additionally, make ext4_fc_replay_inode() propagate errors properly instead of always returning 0.
From the CVE record · Linux
The Linux kernel's ext4_fc_replay_inode() can leak a buffer reference on several error paths during fast-commit replay. The input does not establish whether an attacker can trigger the leak or specify the access or user interaction required.
Engineers running the Linux kernel with ext4 should check their kernel versions against the vendor advisory; affected versions are not specified.