Description
In the Linux kernel, the following vulnerability has been resolved: fs/adfs: bound directory entry name length in adfs_fplus_getnext() adfs_fplus_getnext() reads the per-entry name length bigdirobnamelen straight from the on-disk big directory and passes it to adfs_dir_copyfrom() as the copy length into obj->name[], a fixed ADFS_MAX_NAME_LEN (260) byte buffer. adfs_dir_copyfrom() only bounds the copy against the number of directory buffers, not the size of the destination, so a crafted image with bigdirobnamelen larger than the buffer overflows the stack-allocated object_info::name that adfs_fplus_iterate() passes in. adfs_object_fixup() may additionally append a four byte ",xyz" filetype suffix, so the accepted length must also leave room for that. The old-style directory parser (dir_f.c) already clamps names to ADFS_F_NAME_LEN, and adfs_fplus_validate_header() validates the header name fields, but the per-entry name length in the big directory format was never checked. Reject over-long entries, using -EIO as elsewhere in this file for a corrupt big directory.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < d069df679adbb74d2f61ea7fd55c38a13ef62322affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < cec2df4927d21c577e932f12d586004957659ef5affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < 86c9518ed8a21ca17c55e25dbd5ade6eb842517baffected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < d41c3c8f10b456aa3d75ea3107ce13f8b58f4598affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < f8944a8761d291728e318358d13ac6c41078da51affected1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 to < ebf5025b0d989f95542fc9da899b7de2fec499f2affected
Linux Linux
Default version status: affected
2.6.12affected0 to < 2.6.12unaffected5.10.276 to ≤ 5.10.*unaffected5.15.227 to ≤ 5.15.*unaffected6.12.120 to ≤ 6.12.*unaffected6.18.66 to ≤ 6.18.*unaffected7.3.7 to ≤ 7.3.*unaffected7.4-rc3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/d069df679adbb74d2f61ea7fd55c38a13ef62322 ↗
- https://git.kernel.org/stable/c/cec2df4927d21c577e932f12d586004957659ef5 ↗
- https://git.kernel.org/stable/c/86c9518ed8a21ca17c55e25dbd5ade6eb842517b ↗
- https://git.kernel.org/stable/c/d41c3c8f10b456aa3d75ea3107ce13f8b58f4598 ↗
- https://git.kernel.org/stable/c/f8944a8761d291728e318358d13ac6c41078da51 ↗
- https://git.kernel.org/stable/c/ebf5025b0d989f95542fc9da899b7de2fec499f2 ↗