<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/fs/fat, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-11T12:19:54+00:00</updated>
<entry>
<title>Merge branch 'fs-next' of linux-next</title>
<updated>2026-09-11T12:19:54+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-11T12:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=35b488d33153a1b21cb80c41ae64b214c0216180'/>
<id>urn:sha1:35b488d33153a1b21cb80c41ae64b214c0216180</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fat: calculate data area start without overflow</title>
<updated>2026-09-11T03:22:15+00:00</updated>
<author>
<name>Hengyu Liang</name>
<email>hengyul@cs.unc.edu</email>
</author>
<published>2026-09-02T17:01:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=0d7089221ee12b4e09f500ab917d0047453ac184'/>
<id>urn:sha1:0d7089221ee12b4e09f500ab917d0047453ac184</id>
<content type='text'>
On 32-bit architectures, sbi-&gt;fat_length, sbi-&gt;dir_start and
sbi-&gt;data_start are unsigned long.  The number of FATs is an 8-bit BPB
field, while the FAT32 length is a 32-bit BPB field.  Therefore, the
calculation

    sbi-&gt;fat_start + sbi-&gt;fats * sbi-&gt;fat_length

can wrap before data_start is checked against total_sectors.

For example, with fat_start=32, fats=2 and fat_length=0x80000001, the
unwrapped data area start is 0x100000022 (4294967330), but the calculation
wraps to 34 on i386.  With total_sectors=36, the validation then
incorrectly passes.

The following script creates an image that demonstrates the problem:

    python3 - &lt;&lt;'PY'
    import struct

    S = 512
    b = bytearray(36 * S)

    def p(off, fmt, value):
        struct.pack_into(fmt, b, off, value)

    # FAT32 BPB
    b[0:3] = b'\xeb\x58\x90'
    b[3:11] = b'MSWIN4.1'
    p(11, '&lt;H', 512)
    b[13] = 1
    p(14, '&lt;H', 32)             # reserved sectors
    b[16] = 2                   # number of FATs
    p(17, '&lt;H', 0)
    p(19, '&lt;H', 0)
    b[21] = 0xf8
    p(22, '&lt;H', 0)
    p(24, '&lt;H', 1)
    p(26, '&lt;H', 1)
    p(32, '&lt;I', 36)             # total sectors
    p(36, '&lt;I', 0x80000001)     # FAT32 length
    p(44, '&lt;I', 2)              # root cluster
    p(48, '&lt;H', 1)              # FSINFO sector
    b[64] = 0x80
    b[66] = 0x29
    p(67, '&lt;I', 0x12345678)
    b[71:82] = b'OVERFLOW   '
    b[82:90] = b'FAT32   '
    b[510:512] = b'\x55\xaa'

    # FSINFO
    p(S, '&lt;I', 0x41615252)
    p(S + 484, '&lt;I', 0x61417272)
    p(S + 488, '&lt;I', 0xffffffff)
    p(S + 492, '&lt;I', 0xffffffff)

    # Wrapped FAT starts at sector 32
    fat = 32 * S
    p(fat + 8, '&lt;I', 0x0fffffff)   # FAT[2]
    p(fat + 12, '&lt;I', 0x0fffffff)  # FAT[3]

    # Wrapped data_start == 34
    root = 34 * S
    b[root:root + 11] = b'ESCAPE  TXT'
    b[root + 11] = 0x20
    p(root + 26, '&lt;H', 3)
    p(root + 28, '&lt;I', 4)
    b[35 * S:35 * S + 4] = b'OOB!'

    open('fat-overflow.img', 'wb').write(b)
    PY

Attach fat-overflow.img as /dev/sdb and run:

    mount -t vfat -o ro /dev/sdb /mnt
    cat /mnt/ESCAPE.TXT

On an unpatched i386 kernel, the mount succeeds and reading the file
returns:

    OOB!

On an x86-64 kernel and on a patched i386 kernel, mounting is rejected
with:

    mount: mounting /dev/sdb on /mnt failed: Invalid argument

Calculate dir_start and data_start in u32 using check_mul_overflow() and
check_add_overflow().  Since total_sectors is also a u32 value, any result
that overflows u32 cannot describe a valid volume.  Reject such layouts
before storing the values in the existing unsigned long fields.  The
existing total_sectors check handles values that fit in u32 but still lie
beyond the volume.

Link: https://lore.kernel.org/20260902170115.4162222-1-hengyul@cs.unc.edu
Signed-off-by: Hengyu Liang &lt;hengyul@cs.unc.edu&gt;
Acked-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: fix fat_ent_write() for reverting the value</title>
<updated>2026-09-11T03:22:02+00:00</updated>
<author>
<name>OGAWA Hirofumi</name>
<email>hirofumi@mail.parknet.co.jp</email>
</author>
<published>2026-08-25T12:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c1e2b8a680e26ef73e76f2af9cd0248a5ba82dc1'/>
<id>urn:sha1:c1e2b8a680e26ef73e76f2af9cd0248a5ba82dc1</id>
<content type='text'>
commit 64d9183203ee ("fat: restore original value when fat_ent_write
failed") try to revert the fatent value to old value when got the error on
mirror FAT.

However it didn't work if the error is when writing the fatent bh.  In
that case, the bh is cleared the uptodate flag, so reuse bh is invalid.

Fix this by reverting the fatent only if got the error on mirror FAT.

Link: https://lore.kernel.org/87ik4yz9fv.fsf_-_@mail.parknet.co.jp
Fixes: 64d9183203ee ("fat: restore original value when fat_ent_write failed")
Signed-off-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Reported-by: syzbot+e64c6472a3d96a75172a@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e64c6472a3d96a75172a
Reported-by: syzbot+26461e903494e689c24f@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=26461e903494e689c24f
Cc: Yemu Lu &lt;prcups@krgm.moe&gt;
Cc: Ren Wei &lt;n05ec@lzu.edu.cn&gt;
Cc: Yuan Tan &lt;yuantan098@gmail.com&gt;
Cc: Yifan Wu &lt;yifanwucs@gmail.com&gt;
Cc: Juefei Pu &lt;tomapufckgml@gmail.com&gt;
Cc: Xin Liu &lt;bird@lzu.edu.cn&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fat: check for a metadata write error with buffer_write_io_error()</title>
<updated>2026-08-31T08:19:22+00:00</updated>
<author>
<name>Chao Shi</name>
<email>coshi036@gmail.com</email>
</author>
<published>2026-08-06T16:58:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a93ff8e2e398e5b2c252230a6878990808caf360'/>
<id>urn:sha1:a93ff8e2e398e5b2c252230a6878990808caf360</id>
<content type='text'>
fat_sync_bhs() waits for the writes it issued and then tests
!buffer_uptodate() to find the ones that failed.  That relies on the write
completion handler clearing BH_Uptodate on error, which this series
removes: a buffer whose write failed still holds the data the filesystem
asked to be written, so declaring it not up to date is wrong and makes
callers re-read it.

Test BH_Write_EIO, which is what the completion handler sets and what this
code actually wants to know.

No behaviour change today - a failed write sets BH_Write_EIO and clears
BH_Uptodate together.  It stops being a no-op at the end of the series,
where the new test is the one that still works.

Acked-by: Weidong Zhu &lt;weizhu@fiu.edu&gt;
Signed-off-by: Chao Shi &lt;coshi036@gmail.com&gt;
Link: https://patch.msgid.link/4b6019b5a48b83c8235918b084248983a57692e1.1785951556.git.coshi036@gmail.com
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'mm-nonmm-stable-2026-08-22-16-57' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm</title>
<updated>2026-08-23T15:07:11+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-23T15:07:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e5f92606156a6a823992294d214c285b49cd72e9'/>
<id>urn:sha1:e5f92606156a6a823992294d214c285b49cd72e9</id>
<content type='text'>
Pull non-MM updates from Andrew Morton:

 - "ocfs2/dlm: bound peer-controlled lengths in the o2dlm" (Bryam
   Vargas)

   Validate and bound all input lengths and count fields in the o2dlm
   migration and recovery receive handlers to prevent memory corruption
   and kernel panics from malformed cluster messages

 - "ocfs2: validate xattr entry bounds" (Cen Zhang)

   Validate OCFS2 extended attribute entry name and value bounds during
   metadata reads to prevent out-of-range memory accesses during
   retrieval or listing operations.

 - "taskstats: fix cgroupstats invalid fd handling and add selftests"
   (Yiyang Chen)

   Return -EBADF when cgroupstats receives an invalid file descriptor to
   prevent caller hangs and misleading success ACKs. Add a kselftest to
   validate valid cgroup v1 queries and verify proper error handling
   across different Netlink flag combinations.

 - "misc lib/raid/ improvements v2" (Christoph Hellwig)

   Improve benchmark-based algorithm selection for the XOR and RAID6
   libraries, add KUnit benchmark tests, and cleanup minor
   implementation details.

 - "ocfs2: cluster: o2hb_region_pin() fixes" (Joseph Qi)

   Fix sleeping-in-atomic, lock order inversion and error-path cleanup
   bugs in o2hb_region_pin() by releasing o2hb_live_lock across sleeping
   configfs_depend_item() calls and using unlocked variants from
   callback context. Ensure failed pin attempts properly decrement user
   counts and unpin partially initialized heartbeat regions to prevent
   memory leaks and unprotected states.

 - "lib/ucs2_string.c: fix out-of-bounds read in ucs2_strnlen()"
   (Vincent Mailhol)

   Fix an off-by-one which could cause an out-of-bounds read.

 - "ocfs2: harden heartbeat teardown races" (Cen Zhang)

   Fix two OCFS2 heartbeat/o2net teardown races found by KASAN.

 - "taskstats: tidy up the cpumask command path" *Bradley Morgan)

   make two small cleanups in kernel/taskstats.c.

 - "ocfs2: validate active orphan slots during inode read" (ZhengYuan
   Huang)

   Validate active ordinary and append-DIO orphan slots read from OCFS2
   dinodes at the metadata boundary to prevent corrupted slot indices
   from causing out-of-bounds array accesses.

 - "ocfs2: bound-check both readdir re-validation scans" (Zhan Xusheng)

   Enforce strict boundary checks on directory entry record lengths and
   offset calculations during OCFS2 directory re-scans to prevent
   out-of-bounds memory reads and directory position corruption.

* tag 'mm-nonmm-stable-2026-08-22-16-57' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (95 commits)
  mailmap: fix bouncing address for Taniya Das
  ocfs2: bound-check dir entries in the inline-data re-validation scan
  ocfs2: bound-check dir entries in the readdir re-validation scan
  squashfs: avoid thundering-herd cache wakeups
  prctl: fix PR_SET_MM_AUXV losing the forced AT_NULL terminator
  mailmap: update email address for Linfeng Sun
  lib/interval_tree: fix allocation warning messages
  checkpatch: add NOKPROBE_SYMBOL to the whitelist of lines that can occur immediately after functions
  Squashfs: check block offset is not negative
  signal: factor out the kernel reserved si_code check
  ocfs2: fix readdir position truncation on 32-bit kernels
  ocfs2: fix cached cluster count after suballocator reclaim
  ocfs2: fix circular locking dependency in ocfs2_init_acl()
  ocfs2: validate DIO orphan slot during inode read
  ocfs2: validate orphan slot during inode read
  selftests/prctl: fix non-anonymous VMA mapping in set-anon-vma-name test
  MAINTAINERS: add IRC and patchwork for LTP
  include/linux/list.h: mark list_add and __list_add as __always_inline
  tools/mm: prevent page_owner_sort from truncating input
  hung_task: update DETECT_HUNG_TASK_BLOCKER Kconfig help
  ...
</content>
</entry>
<entry>
<title>Merge tag 'vfs-7.3-rc1.sync' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-08-17T21:21:00+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-17T21:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ff68e5f557f69a08fdcfa4ce8b1b809d63bd4f45'/>
<id>urn:sha1:ff68e5f557f69a08fdcfa4ce8b1b809d63bd4f45</id>
<content type='text'>
Pull vfs writeback updates from Christian Brauner:
 "This makes sync_inode_metadata() and writeback_single_inode() persist
  not only the inode but all metadata associated with it.

  A new .sync_inode_metadata superblock operation is called from
  __writeback_single_inode(). Alongside it a new I_METADATA_WRITEBACK
  state flag is added.

  Filesystems no longer need their own mmb_fsync() implementations and
  can just use simple_fsync(). All metadata is now written for IS_SYNC
  and IS_DIRSYNC inodes. Races where several fsyncs raced and mmb_sync()
  could return before all buffers were really persisted are fixed since
  I_SYNC now serializes properly.

  The I_METADATA_WRITEBACK scheme also fixes the case where a
  WB_SYNC_NONE writeback landing between write(2) and fsync(2) left
  fsync(2) failing to persist the inode. That problem is not specific to
  filesystems using the generic metadata bh tracking, and the ones that
  do not are left alone.

  ext2, udf, bfs, minix, fat and ext4 in nojournal mode have their data
  integrity writeout fixed and are converted. affs drops metadata bh
  tracking and mmb_fsync() is removed.

  A few other fixes came out of this:

   - a UAF in mark_buffer_write_io_error()

   - missed inode writeback when racing with __writeback_single_inode()

   - ext4 allocating the mapping_metadata_bhs struct on demand

   - three fat fixes: a lost inode update in do_msdos_rename() with
     DIRSYNC, inode buffer write errors not propagating out of
     fat_sync_inode_metadata() and directory entries not being
     persisted on fsync(2) of the root directory"

* tag 'vfs-7.3-rc1.sync' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (24 commits)
  writeback: Export __inode_attach_wb()
  fat: Fix persisting directory entries on fsync(2) of the root directory
  fat: Propagate inode buffer write errors from fat_sync_inode_metadata()
  fat: Fix lost inode update in do_msdos_rename() with DIRSYNC
  vfs: Remove mmb_fsync()
  fat: Replace fat_sync_inode() with sync_inode_metadata()
  fat: Fix missed inode writeback during fsync(2)
  ext4: Fix data integrity writeout issues in nojournal mode
  minix: Fix data integrity writeout issues
  bfs: Fix data integrity writeout issues
  udf: Fold udf_update_inode() into udf_write_inode()
  udf: Use sync_inode_metadata() in udf_evict_inode()
  udf: Drop udf_sync_inode()
  udf: Use sync_inode_metadata() to writeout IS_SYNC inode
  udf: Fix data integrity writeout issues
  ext2: Fix data integrity writeout issues
  ext2: Avoid unnecessary inode buffer writeback for sync(2)
  ext2: Drop __ext2_write_inode()
  ext2: Fix lost inode updates for IS_SYNC inodes
  fs: Provide way for filesystem to wait for metadata writeback
  ...
</content>
</entry>
<entry>
<title>Merge tag 'vfs-7.3-rc1.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-08-17T19:03:34+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-17T19:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=ab5ed08f2d8396fb8e3942569bbbd5cd569a753e'/>
<id>urn:sha1:ab5ed08f2d8396fb8e3942569bbbd5cd569a753e</id>
<content type='text'>
Pull vfs lookup updates from Christian Brauner:
 "This refactors lookup_open() and adds vfs_lookup_open() for nfsd.

  mnt_want_write() and parent locking are moved into lookup_open()
  itself.

  audit_inode_child() is also now called in lookup_open() on failure.
  That is the calling convention in vfs_create() and vfs_mkdir(), but
  lookup_open() made no such call when atomic_open() should have created
  a file and did not. And neither did the regular -&gt;create() path fwiw.

  This also contains work to remove the unneeded excl argument from the
  -&gt;create() inode op"

* tag 'vfs-7.3-rc1.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  fs/namei.c: fix coding style in atomic_open() and lookup_open()
  fs/namei.c: fix kerneldoc of atomic_open() and vfs_lookup_open()
  fs/namei.c: update stale comments in lookup_open()
  Remove excl arg to -&gt;create inode_operation
  fs/namei.c: update kerneldoc of atomic_open()
  vfs: call audit_inode_child() in lookup_open() on failure
  vfs: move create error &amp;&amp; negative dentry case in lookup_open() up
  VFS: add vfs_lookup_open() for nfsd
  VFS: move delegated_inode retry loop into lookup_open()
  VFS: move mnt_want_write() and locking into lookup_open()
</content>
</entry>
<entry>
<title>Merge tag 'vfs-7.3-rc1.fat' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-08-17T16:30:42+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-17T16:30:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=3d1f95267769caf5c3eb71a2c9586213ea0a3ef2'/>
<id>urn:sha1:3d1f95267769caf5c3eb71a2c9586213ea0a3ef2</id>
<content type='text'>
Pull FAT update from Christian Brauner:
 "This rejects names longer than NAME_MAX in msdos_format_name().

  The VFS only enforces PATH_MAX rather than the length of an individual
  component. open() on such a path component reported success for a name
  far longer than NAME_MAX"

* tag 'vfs-7.3-rc1.fat' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
  fat: reject name longer than NAME_MAX in msdos_format_name()
</content>
</entry>
<entry>
<title>fat: release buffer head after rebuilding parent</title>
<updated>2026-08-04T04:10:17+00:00</updated>
<author>
<name>Yichong Chen</name>
<email>chenyichong@uniontech.com</email>
</author>
<published>2026-07-15T02:09:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=83e98dbf19ab64e8528e101e20f8d50e1aaa68a8'/>
<id>urn:sha1:83e98dbf19ab64e8528e101e20f8d50e1aaa68a8</id>
<content type='text'>
fat_scan_logstart() leaves the matching directory entry's buffer head in
sinfo.bh for the caller to release, just like fat_scan().

fat_rebuild_parent() uses the directory entry to rebuild the parent inode
for the nostale_ro NFS export path, but does not release sinfo.bh after a
successful scan.  Release it once fat_build_inode() has consumed the
directory entry data.

Link: https://lore.kernel.org/20260715020957.1096309-1-chenyichong@uniontech.com
Fixes: f1e6fb0ab451 ("fat (exportfs): rebuild directory-inode if fat_dget()")
Signed-off-by: Yichong Chen &lt;chenyichong@uniontech.com&gt;
Acked-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Cc: Amit Sahrawat &lt;a.sahrawat@samsung.com&gt;
Cc: chenyichong &lt;chenyichong@uniontech.com&gt;
Cc: Namjae Jeon &lt;namjae.jeon@samsung.com&gt;
Cc: Ravishankar N &lt;ravi.n1@samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>FAT: allow 0xE9 near jump in fat_read_static_bpb()</title>
<updated>2026-08-04T04:10:14+00:00</updated>
<author>
<name>Ziran Zhang</name>
<email>zhangcoder@yeah.net</email>
</author>
<published>2026-04-12T06:59:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bc96ad381f05668123ce6fe760ad3a370fbf35ea'/>
<id>urn:sha1:bc96ad381f05668123ce6fe760ad3a370fbf35ea</id>
<content type='text'>
fat_read_static_bpb() only accepts a short jump as a valid bootstrap code
signature for DOS 1.x volumes when the dos1xfloppy mount option is used.

However, according to the Microsoft fatgen103.doc, the BS_jmpBoot field
has two allowed forms: 0xEB 0x??  0x90 (short jump + NOP) and 0xE9 0x?? 
0x??  (near jump).  The specification explicitly states that either form
is acceptable.

This patch relaxes the check to also accept 0xE9 as the first byte of the
jump instruction.

Link: https://lore.kernel.org/20260412070109.5197-1-zhangcoder@yeah.net
Signed-off-by: Ziran Zhang &lt;zhangcoder@yeah.net&gt;
Acked-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Cc: Christian Brauner &lt;brauner@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
</feed>
