CVE-2024-46744: Squashfs: sanity check symbolic link size
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: sanity check symbolic link size
Syzkiller reports a "KMSAN: uninit-value in picklink" 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. squashfsreadinode() is called to read the symbolic link from disk. This assigns the corrupted value 3875536935 to inode->isize.
2. Later squashfssymlinkreadfolio() 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.
This patch adds a sanity check which checks that the symbolic link size is not larger than expected.
--
V2: fix spelling mistake.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
Squashfs: sanity check symbolic link size
Syzkiller reports a "KMSAN: uninit-value in picklink" 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. squashfsreadinode() is called to read the symbolic link from disk. This assigns the corrupted value 3875536935 to inode-isize.
2. Later squashfssymlinkreadfolio() 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.
This patch adds a sanity check which checks that the symbolic link size is not larger than expected.
--
V2: fix spelling mistake.
— IBM
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.22-1Fixed in 6.12.25-1 - Upgrade
Upgrade
debian/linux-6.1to a version that resolves this vulnerability.Fixed in 6.1.129-1~deb11u1
Event History
Frequently Asked Questions
What is the severity of CVE-2024-46744?
CVE-2024-46744 has been classified as a moderate severity vulnerability affecting the Linux kernel.
What versions of Linux are affected by CVE-2024-46744?
CVE-2024-46744 affects various versions of the Linux kernel, specifically versions below 5.10.226 and certain ranges between 4.19 and 6.11-rc3.
How do I fix CVE-2024-46744?
To fix CVE-2024-46744, upgrade your Linux kernel to version 5.10.226 or above, or to the specific remedied versions according to your Linux distribution.
What causes CVE-2024-46744?
CVE-2024-46744 is caused by an uninitialized page resulting from a corrupted symbolic link size read in the Squashfs component of the Linux kernel.
Can CVE-2024-46744 be exploited?
Yes, CVE-2024-46744 can potentially be exploited by attackers to manipulate symbolic links, leading to unauthorized access or system instability.