4.9 MEDIUM
- CVSS version (CVSS): 3.1
- Attack Vector (AV): Physical (P)
- Attack Complexity (AC): Low (L)
- Privileges Required (PR): None (N)
- User Interaction (UI): Required (R)
- Scope (S): Unchanged (U)
- Confidentiality (C): Low (L)
- Integrity (I): None (N)
- Availability (A): High (H)
- Modified Attack Vector (MAV): Physical (P)
- Modified Attack Complexity (MAC): Low (L)
- Modified Privileges Required (MPR): None (N)
- Modified User Interaction (MUI): Required (R)
- Modified Confidentiality (MC): Low (L)
- Modified Scope (MS): Unchanged (U)
- Modified Integrity (MI): None (N)
- Modified Availability (MA): High (H)
Activity log
- Created suggestion
fs: ext2: Missing structural validation of directory entries can cause out-of-bounds read and zero-progress directory traversal
Zephyr's ext2 directory-entry parser does not fully validate on-disk directory entry structure before copying the entry name and advancing traversal state. In ext2_fetch_direntry() (subsys/fs/ext2/ext2_diskops.c), the code only checks de_name_len <= EXT2_MAX_FILE_NAME and then copies the name with memcpy without validating the structural relationship between de_rec_len, de_name_len, and the directory block boundary (for example that de_rec_len is non-zero, at least the size of the entry header, and that the record fits within the block). Callers such as find_dir_entry() and ext2_get_direntry() (subsys/fs/ext2/ext2_impl.c) then advance traversal using the unvalidated de_rec_len. A crafted ext2 image can therefore cause an out-of-bounds read from the directory block buffer when a malformed entry near the end of a block triggers an oversized name copy, or a zero-progress infinite loop when de_rec_len == 0. The issue is not reached at mount time but later through directory traversal paths such as pathname lookup, stat/open/unlink/rename, and readdir. The primary impact is denial of service and out-of-bounds reads under attacker-controlled ext2 images mounted from untrusted media.
Affected products
- =<4.4
Matching in nixpkgs
pkgs.python312Packages.smoke-zephyr
None
pkgs.python313Packages.smoke-zephyr
Python utility collection
pkgs.python314Packages.smoke-zephyr
Python utility collection
pkgs.python312Packages.zephyr-python-api
None
pkgs.python313Packages.zephyr-python-api
Set of wrappers for Zephyr Scale (TM4J) REST API
pkgs.python314Packages.zephyr-python-api
Set of wrappers for Zephyr Scale (TM4J) REST API
pkgs.python312Packages.zephyr-test-management
None
pkgs.python313Packages.zephyr-test-management
Wrappers for both Zephyr Scale and Zephyr Squad (TM4J) REST APIs
Package maintainers
-
@fabaff Fabian Affolter <mail@fabian-affolter.ch>
-
@Steinhagen Viorel-Cătălin Răpițeanu <rapiteanu.catalin@gmail.com>