In the Linux kernel, the following vulnerability has been resolved:
fs/jfs: Add validity check for dbmaxag and dbagpref
Both dbmaxag and dbagpref are used as the index of the dbagfree array, but there is currently no validity check for dbmaxag 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/jfsdmap.c:639:20 index 7936 is out of range for type 'atomict[128]'
Add checking that the values of dbmaxag and dbagpref are valid indexes for the db_agfree array.