btrfs: abort in rename_exchange if we fail to insert the second ref
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 |
|
|
5.10.435.12.105.13In the Linux kernel, the following vulnerability has been resolved:
btrfs: abort in rename_exchange if we fail to insert the second ref
Error injection stress uncovered a problem where we'd leave a dangling inode ref if we failed during a rename_exchange. This happens because we insert the inode ref for one side of the rename, and then for the other side. If this second inode ref insert fails we'll leave the first one dangling and leave a corrupt file system behind. Fix this by aborting if we did the insert for the first inode ref.
From the CVE record · Linux
The Linux kernel's btrfs rename_exchange operation can leave a dangling inode reference and corrupt the file system if insertion of the second inode reference fails. This occurs during a rename operation under that failure condition; the input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with btrfs should check their versions; affected versions are not specified.