fs/jfs: Add check for negative db_l2nbperpage
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 0cb567e727339a192f9fd0db00781d73a91d15a6| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs/jfs: Add check for negative db_l2nbperpage
l2nbperpage is log2(number of blks per page), and the minimum legal value should be 0, not negative.
In the case of l2nbperpage being negative, an error will occur when subsequently used as shift exponent.
Syzbot reported this bug:
UBSAN: shift-out-of-bounds in fs/jfs/jfs_dmap.c:799:12 shift exponent -16777216 is negative
From the CVE record · Linux
The Linux kernel’s JFS code does not check whether db_l2nbperpage is negative before using it as a shift exponent. A negative value can trigger a shift-out-of-bounds error. The input does not specify how an attacker could trigger it or whether access or user interaction is required.
Engineers running Linux kernels with JFS should check their installations; affected versions are not specified.