In the Linux kernel, the following vulnerability has been resolved:
ext4: fix BUGON() when directory entry has invalid reclen
The reclen field in the directory entry has to be a multiple of 4. A corrupted filesystem image can be used to hit a BUG() in ext4reclentodisk(), called from makeindexed_dir().
------------[ cut here ]------------ kernel BUG at fs/ext4/ext4.h:2413! ... RIP: 0010:makeindexeddir+0x53f/0x5f0 ... Call Trace: <TASK> ? adddirenttobuf+0x1b2/0x200 ext4addentry+0x36e/0x480 ext4addnondir+0x2b/0xc0 ext4create+0x163/0x200 pathopenat+0x635/0xe90 dofilpopen+0xb4/0x160 ? _createobject.isra.0+0x1de/0x3b0 ? _rawspinunlock+0x12/0x30 dosysopenat2+0x91/0x150 _x64sysopen+0x6c/0xa0 dosyscall64+0x3c/0x80 entrySYSCALL64afterhwframe+0x46/0xb0
The fix simply adds a call to ext4checkdir_entry() to validate the directory entry, returning -EFSCORRUPTED if the entry is invalid.