In the Linux kernel, the following vulnerability has been resolved:
ntfs: Fix panic about slab-out-of-bounds caused by ntfs_listxattr()
Here is a BUG report from syzbot:
BUG: KASAN: slab-out-of-bounds in ntfslistea fs/ntfs3/xattr.c:191 [inline] BUG: KASAN: slab-out-of-bounds in ntfs_listxattr+0x401/0x570 fs/ntfs3/xattr.c:710 Read of size 1 at addr ffff888021acaf3d by task syz-executor128/3632
Call Trace: ntfslistea fs/ntfs3/xattr.c:191 [inline] ntfslistxattr+0x401/0x570 fs/ntfs3/xattr.c:710 vfslistxattr fs/xattr.c:457 [inline] listxattr+0x293/0x2d0 fs/xattr.c:804
Fix the logic of eaall iteration. When the ea->namelen is 0, return immediately, or Add2Ptr() would visit invalid memory in the next loop.
[almaz.alexandrovich@paragon-software.com: lines of the patch have changed]