fs: jfs: fix shift-out-of-bounds in dbAllocAG
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 0536f76a2bca83d1a3740517ba22cc93a44b3099| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs: jfs: fix shift-out-of-bounds in dbAllocAG
Syzbot found a crash : UBSAN: shift-out-of-bounds in dbAllocAG. The underlying bug is the missing check of bmp->db_agl2size. The field can be greater than 64 and trigger the shift-out-of-bounds.
Fix this bug by adding a check of bmp->db_agl2size in dbMount since this field is used in many following functions. The upper bound for this field is L2MAXL2SIZE - L2MAXAG, thanks for the help of Dave Kleikamp. Note that, for maintenance, I reorganized error handling code of dbMount.
From the CVE record · Linux
The Linux kernel’s JFS code does not check the upper bound of `bmp->db_agl2size` before using it in `dbAllocAG`. A value greater than 64 can cause a shift-out-of-bounds crash; the input does not specify how an attacker could trigger it or whether access, authentication, or user interaction is required.
Engineers running Linux kernels with JFS support should check their versions; affected versions are not specified.