#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:
Blocking:

Description

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 Jan 21, 2010 at 9:07:31 AM.
Bugfix
pr1491-rd.zip (2.5 KB) - added by Chris Johns on Mar 5, 2010 at 2:54:28 AM.
2M DOSFS Format RAM disk image with "12345678.ABC"
dosfs-2.patch (2.1 KB) - added by Chris Johns on Mar 5, 2010 at 3:41:35 AM.
DOS file name eval fix

Download all attachments as: .zip

Change History (10)

Changed on Jan 21, 2010 at 9:07:31 AM by Sebastian Huber

Attachment: dosfs.patch added

Bugfix

comment:1 Changed on Jan 21, 2010 at 9:07:58 AM by Sebastian Huber

Cc: thomas.doerfler added

comment:2 Changed on Mar 2, 2010 at 3:13:31 AM by Chris Johns

Status: newassigned

Changed on Mar 5, 2010 at 2:54:28 AM by Chris Johns

Attachment: pr1491-rd.zip added

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

Changed on Mar 5, 2010 at 3:41:35 AM by Chris Johns

Attachment: dosfs-2.patch added

DOS file name eval fix

comment:3 Changed on Mar 5, 2010 at 3:41:35 AM by Chris Johns

attachments.isobsolete: 01

comment:4 Changed on Mar 17, 2010 at 11:11:30 AM by Sebastian Huber

Severity: normalblocker

comment:5 Changed on Apr 1, 2010 at 8:53:45 AM by Chris Johns

Resolution: fixed
Status: assignedclosed

comment:6 Changed on Apr 1, 2010 at 8:54:14 AM by Chris Johns

Fixed.

comment:7 Changed on Oct 10, 2017 at 6:50:58 AM by Sebastian Huber

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