CVE-2026-139020: gfs2: reject invalid inode sizes
In the Linux kernel, the following vulnerability has been resolved:
gfs2: reject invalid inode sizes
A corrupted GFS2 image can store a dinode size that is larger than what VFS isize can represent. gfs2dinodein() reads the on-disk disize as a u64 and writes it directly into inode->isize. If the value is larger than S64MAX, the incore isize becomes negative. That negative value can bypass the existing stuffed inode size check:
inode->isize > gfs2maxstuffedsize(ip)
Later, gfs2quotad may try to sync the quota file and unstuff the quota inode. gfs2unstufferfolio() reads the negative isize into an unsigned length and passes it to memcpy(), turning it into a huge copy size and triggering a out-of-bound issue.
Reject dinodes whose size exceeds sb->smaxbytes before storing the value in inode->isize. Also make the stuffed inode check use the raw on-disk size while it is still unsigned.