Skip to contentSkip to conversation

CVE-2026-89634: smb: client: fix ALIGN() overflow in symlink_data() error context loop

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 11

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

smb: client: fix ALIGN() overflow in symlink_data() error context loop

The check added by commit 7d9a7f1f96cd ("smb/client: fix possible infinite loop and oob read in symlink_data()") compared the post-ALIGN length against the remaining buffer, but ALIGN() itself can overflow:
for ErrorDataLength near UINT32_MAX (e.g. 0xFFFFFFF9), ALIGN(x, 8) wraps to 0, so the subsequent bounds check passes, and the loop advances by zero bytes leaving 'p' pointing into stale data.

Fix by checking the raw ErrorDataLength against the remaining space before applying ALIGN(), then checking again after. Since raw_len is bounded by the buffer, raw_len + 7 cannot overflow, so the second check is an exact post-alignment bounds guard.

The Linux kernel CVE team has assigned CVE-2026-89634 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.1 with commit 76894f3e2f71177747b8b4763fb180e800279585 and fixed in 6.12.109 with commit 657372ba6ea50b4474d2a6a610097eae8cd1f3e9
	Issue introduced in 6.1 with commit 76894f3e2f71177747b8b4763fb180e800279585 and fixed in 6.18.50 with commit 1f824f61d1df52392eaf0b74dfa5659d724fde30
	Issue introduced in 6.1 with commit 76894f3e2f71177747b8b4763fb180e800279585 and fixed in 7.2.4 with commit 62a3025983c8c735a3c6fc85a59316f31b59af07
	Issue introduced in 6.1 with commit 76894f3e2f71177747b8b4763fb180e800279585 and fixed in 7.3-rc1 with commit 62656b024efc21c3230eade1a847f25871c3d2bb
	Issue introduced in 6.0.16 with commit 2d046892a493d9760c35fdaefc3017f27f91b621

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-89634

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/smb/client/smb2file.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/657372ba6ea50b4474d2a6a610097eae8cd1f3e9
	https://git.kernel.org/stable/c/1f824f61d1df52392eaf0b74dfa5659d724fde30
	https://git.kernel.org/stable/c/62a3025983c8c735a3c6fc85a59316f31b59af07
	https://git.kernel.org/stable/c/62656b024efc21c3230eade1a847f25871c3d2bb