<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr" -->

---
title: Linux 7.3 Corrects Faulty Behavior Of FAT File-System...
description: The Linux msdos (FAT) filesystem driver contained a bug where msdos_format_name() failed to enforce an upper bound on filename length, silently truncating...
canonical: https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Linux 7.3 Corrects Faulty Behavior Of FAT File-System Driver For Filenames Too Fat | daily.dev
og:description: The Linux msdos (FAT) filesystem driver contained a bug where msdos_format_name() failed to enforce an upper bound on filename length, silently truncating...
og:url: https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr
og:image: https://api.daily.dev/og/posts/ZpDtofvpr.png
og:image:alt: Linux 7.3 Corrects Faulty Behavior Of FAT File-System Driver For Filenames Too Fat
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Linux 7.3 Corrects Faulty Behavior Of FAT File-System Driver For Filenames Too Fat

**[Phoronix](https://daily.dev/sources/phoronix)** · 2 min read · 1 upvotes · 0 comments

## Summary

The Linux msdos (FAT) filesystem driver contained a bug where msdos_format_name() failed to enforce an upper bound on filename length, silently truncating names longer than NAME_MAX (255 bytes) to the 8.3 format (11 bytes) while still reporting success. This let fat_scan() match against truncated names, causing open() calls on overly long path components to attach an inode to a dentry with an out-of-spec name, later triggering a WARN_ON_ONCE() in fanotify's event reporting path with an empty name reported to userspace. Huawei engineer Zizhi Wo identified and patched the issue by adding a length check at the single entry point for msdos name handling, aligning it with checks already performed by xfs, 9p, ceph, and simple_lookup(). Note vfat was unaffected since it already rejects overly long names via xlate_to_uni(). The fix has been merged for the upcoming Linux 7.3 kernel and is expected to be backported to stable kernels.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.phoronix.com/news/Linux-7.3-FAT>

## Questions this post answers

### What was the bug in the Linux FAT filesystem driver's filename handling?

The msdos_format_name() function in the Linux FAT driver had no upper-bound check on input filename length, silently truncating names longer than NAME_MAX (255 bytes) into an 8.3 format (11 bytes) while still returning success. This let fat_scan() match against the truncated 11 bytes, so opening an overly long filename could return an inode for any file sharing that truncated 8.3 name, triggering a WARN_ON_ONCE() in fanotify's fsnotify_open() path with an empty name reported to userspace.

_Kernel maintainers tracking VFS and filesystem security fixes can follow FAT driver patches like this on daily.dev._

### Was the vfat driver affected by the FAT filename truncation bug fixed in Linux 7.3?

No, vfat was not affected by this bug. Unlike msdos_format_name(), vfat's file creation path goes through xlate_to_uni(), which already refuses names longer than FAT_LFN_LEN, so the missing NAME_MAX check that affected the msdos driver never applied to vfat.

_Anyone auditing FAT versus vfat filename handling can track kernel filesystem fixes like this via daily.dev._

### How was the Linux FAT driver filename length bug fixed for kernel 7.3?

Huawei engineer Zizhi Wo fixed it by adding a check for 'len > NAME_MAX' at the entry point of msdos_format_name(), the single function that handles all msdos name formatting. This aligns the FAT driver with the NAME_MAX checks already performed by xfs, 9p, ceph, and simple_lookup() at lookup time, and the two-line patch was merged for Linux 7.3 with an expected backport to stable kernels.

_Developers patching kernel filesystem drivers can follow how fixes like this land in mainline via daily.dev._

## Similar posts on daily.dev

- [Linux Enacts Guidance To Tighten Acceptance Of New File-Systems Into The Kernel](https://daily.dev/posts/linux-enacts-guidance-to-tighten-acceptance-of-new-file-systems-into-the-kernel-qifusx1an) · Phoronix · 2 upvotes · 0 comments
- [Linux 7.0 VFS Changes: Non-Blocking Timestamps, Standardized Generic I/O Error Reporting](https://daily.dev/posts/linux-7-0-vfs-changes-non-blocking-timestamps-standardized-generic-i-o-error-reporting-8hdxc0tit) · Phoronix · 0 upvotes · 0 comments
- [Someone moved three lines of code in Linux 7.2 and got a 5% storage speed boost](https://daily.dev/posts/someone-moved-three-lines-of-code-in-linux-7-2-and-got-a-5-storage-speed-boost-4juxmldkx) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#linux](https://daily.dev/tags/linux), [#filesystems](https://daily.dev/tags/filesystems)

[View this post on daily.dev](https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Linux 7.3 Corrects Faulty Behavior Of FAT File-System Driver For Filenames Too Fat","url":"https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr"},"datePublished":"2026-08-18T12:57:24.144Z","dateModified":"2026-09-14T09:33:03.085Z","description":"The Linux msdos (FAT) filesystem driver contained a bug where msdos_format_name() failed to enforce an upper bound on filename length, silently truncating...","image":"https://www.phoronix.com/assets/categories/linuxstorage.webp","thumbnailUrl":"https://www.phoronix.com/assets/categories/linuxstorage.webp","isAccessibleForFree":true,"articleSection":"Phoronix","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Phoronix","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/6a26ba379dd64932830aa0c9803dd7ee","url":"https://daily.dev/sources/phoronix"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"security,linux,filesystems","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Phoronix","item":"https://daily.dev/sources/phoronix"},{"@type":"ListItem","position":3,"name":"Linux 7.3 Corrects Faulty Behavior Of FAT File-System Driver For Filenames Too Fat"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/linux-7-3-corrects-faulty-behavior-of-fat-file-system-driver-for-filenames-too-fat-zpdtofvpr#faq","mainEntity":[{"@type":"Question","name":"What was the bug in the Linux FAT filesystem driver's filename handling?","acceptedAnswer":{"@type":"Answer","text":"The msdos_format_name() function in the Linux FAT driver had no upper-bound check on input filename length, silently truncating names longer than NAME_MAX (255 bytes) into an 8.3 format (11 bytes) while still returning success. This let fat_scan() match against the truncated 11 bytes, so opening an overly long filename could return an inode for any file sharing that truncated 8.3 name, triggering a WARN_ON_ONCE() in fanotify's fsnotify_open() path with an empty name reported to userspace. Kernel maintainers tracking VFS and filesystem security fixes can follow FAT driver patches like this on daily.dev."}},{"@type":"Question","name":"Was the vfat driver affected by the FAT filename truncation bug fixed in Linux 7.3?","acceptedAnswer":{"@type":"Answer","text":"No, vfat was not affected by this bug. Unlike msdos_format_name(), vfat's file creation path goes through xlate_to_uni(), which already refuses names longer than FAT_LFN_LEN, so the missing NAME_MAX check that affected the msdos driver never applied to vfat. Anyone auditing FAT versus vfat filename handling can track kernel filesystem fixes like this via daily.dev."}},{"@type":"Question","name":"How was the Linux FAT driver filename length bug fixed for kernel 7.3?","acceptedAnswer":{"@type":"Answer","text":"Huawei engineer Zizhi Wo fixed it by adding a check for 'len > NAME_MAX' at the entry point of msdos_format_name(), the single function that handles all msdos name formatting. This aligns the FAT driver with the NAME_MAX checks already performed by xfs, 9p, ceph, and simple_lookup() at lookup time, and the two-line patch was merged for Linux 7.3 with an expected backport to stable kernels. Developers patching kernel filesystem drivers can follow how fixes like this land in mainline via daily.dev."}}]}
```

