#1491 closed defect (fixed)

FAT file system bug with 8.3 short name and base name size of 8

Reported by: Sebastian Huber Owned by: Chris Johns
Priority: normal Milestone: 4.10
Component: fs/fat Version: 4.10
Severity: blocker Keywords:
Cc: joel.sherrill@…, thomas.doerfler@… Blocked By:


A FAT 8.3 short file name consists of two parts the base name and the extension. The base name may have up to 8 characters. The function msdos_name_type() does not recognize correct 8.3 short file names with a base name of exactly 8 characters (this kind of files will be called EVIL). As a result the FAT layer can list directories correctly but cannot access files of kind EVIL. The attached patch fixes the bug. Now we have the problem that we created files of kind EVIL as long file name files previously. We cannot read these files anymore after the bug fix. This is because in msdos_find_name_in_fat_file() the parameter lfn_entries is set to 0 for short name files and thus a search in the long file name entries will be suppressed. We now have two options.

Option 1: Accept that we cannot read the EVIL files after the bug fix.

Option 2: Expand the search scope such we can find EVIL files. This reduces performance.

Attachments (3)

dosfs.patch (1.8 KB) - added by Sebastian Huber on 01/21/10 at 09:07:31.
pr1491-rd.zip (2.5 KB) - added by Chris Johns on 03/05/10 at 02:54:28.
2M DOSFS Format RAM disk image with "12345678.ABC"
dosfs-2.patch (2.1 KB) - added by Chris Johns on 03/05/10 at 03:41:35.
DOS file name eval fix

Download all attachments as: .zip

Change History (10)

Changed on 01/21/10 at 09:07:31 by Sebastian Huber

Attachment: dosfs.patch added


comment:1 Changed on 01/21/10 at 09:07:58 by Sebastian Huber

Cc: thomas.doerfler added

comment:2 Changed on 03/02/10 at 03:13:31 by Chris Johns

Status: newassigned

Changed on 03/05/10 at 02:54:28 by Chris Johns

Attachment: pr1491-rd.zip added

2M DOSFS Format RAM disk image with "12345678.ABC"

Changed on 03/05/10 at 03:41:35 by Chris Johns

Attachment: dosfs-2.patch added

DOS file name eval fix

comment:3 Changed on 03/05/10 at 03:41:35 by Chris Johns

attachments.isobsolete: 01

comment:4 Changed on 03/17/10 at 11:11:30 by Sebastian Huber

Severity: normalblocker

comment:5 Changed on 04/01/10 at 08:53:45 by Chris Johns

Resolution: fixed
Status: assignedclosed

comment:6 Changed on 04/01/10 at 08:54:14 by Chris Johns


comment:7 Changed on 10/10/17 at 06:50:58 by Sebastian Huber

Component: fsfs/fat
Note: See TracTickets for help on using tickets.