Squashfs: sanity check symbolic link size
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6545b246a2c815a8fcd07d58240effb6ec3481b1 · < c3af7e460a526007e4bed1ce3623274a1a6afe5e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: sanity check symbolic link size
Syzkiller reports a "KMSAN: uninit-value in pick_link" bug.
This is caused by an uninitialised page, which is ultimately caused by a corrupted symbolic link size read from disk.
The reason why the corrupted symlink size causes an uninitialised page is due to the following sequence of events:
1. squashfs_read_inode() is called to read the symbolic link from disk. This assigns the corrupted value 3875536935 to inode->i_size.
2. Later squashfs_symlink_read_folio() is called, which assigns this corrupted value to the length variable, which being a signed int, overflows producing a negative number.
3. The following loop that fills in the page contents checks that the copied bytes is less than length, which being negative means the loop is skipped, producing an uninitialised page.
From the CVE record · Linux
The Linux kernel’s Squashfs code does not adequately check a symbolic link size read from disk. When a corrupted size is processed, an integer overflow can leave a page uninitialized and trigger an uninitialized-value report in pick_link. The input does not specify authentication, network access, or user-interaction requirements.
Engineers running Linux systems that read Squashfs filesystems should check their kernel versions; affected versions are not specified.