jfs: nlink overflow in jfs_rename
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < fe136426e30ca6debcf916fd6a141555ed9fde74| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
jfs: nlink overflow in jfs_rename
If nlink is maximal for a directory (-1) and inside that directory you perform a rename for some child directory (not moving from the parent), then the nlink of the first directory is first incremented and later decremented. Normally this is fine, but when nlink = -1 this causes a wrap around to 0, and then drop_nlink issues a warning.
After applying the patch syzbot no longer issues any warnings. I also ran some basic fs tests to look for any regressions.
From the CVE record · Linux
The Linux kernel’s JFS rename operation can overflow a directory’s link count. Renaming a child directory within a parent whose link count is already maximal can wrap the count to zero and trigger a warning. The input does not specify network access or authentication requirements.
Operators running Linux kernels with JFS support should check whether their kernel includes the fix; affected versions are not specified.