fs/jfs: Add validity check for db_maxag and db_agpref
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 · < 5013f8269887642cca784adc8db9b5f0b771533f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
fs/jfs: Add validity check for db_maxag and db_agpref
Both db_maxag and db_agpref are used as the index of the db_agfree array, but there is currently no validity check for db_maxag and db_agpref, which can lead to errors.
The following is related bug reported by Syzbot:
UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:639:20 index 7936 is out of range for type 'atomic_t[128]'
Add checking that the values of db_maxag and db_agpref are valid indexes for the db_agfree array.
From the CVE record · Linux
The Linux kernel’s JFS code does not validate db_maxag and db_agpref before using them as indexes into the db_agfree array. Invalid values can cause an array-index-out-of-bounds error. The input does not establish 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.