Skip to contentSkip to conversation

CVE-2025-21711: net/rose: prevent integer overflows in rose_setsockopt()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 27, 2025

lore
Share & tools
lore
#0 lore raw

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

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

net/rose: prevent integer overflows in rose_setsockopt()

In case of possible unpredictably large arguments passed to rose_setsockopt() and multiplied by extra values on top of that, integer overflows may occur.

Do the safest minimum and fix these issues by checking the contents of 'opt' and returning -EINVAL if they are too large. Also, switch to unsigned int and remove useless check for negative 'opt' in ROSE_IDLE case.

The Linux kernel CVE team has assigned CVE-2025-21711 to this issue.

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

	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.129 with commit 9bdee49ad6bbd26ab5e13cc6731e54fb1b6c1dca
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.76 with commit 352daa50946c3bbb662432e8daf54d6760796589
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.13 with commit d08f4074f9c69f7e95502587eb1b258a965ba7f0
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.13.2 with commit e5338930a29d0ab2a5af402f5f664aeba0d1a676
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.14-rc1 with commit d640627663bfe7d8963c7615316d7d4ef60f3b0b

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-2025-21711

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:
net/rose/af_rose.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/9bdee49ad6bbd26ab5e13cc6731e54fb1b6c1dca
	https://git.kernel.org/stable/c/352daa50946c3bbb662432e8daf54d6760796589
	https://git.kernel.org/stable/c/d08f4074f9c69f7e95502587eb1b258a965ba7f0
	https://git.kernel.org/stable/c/e5338930a29d0ab2a5af402f5f664aeba0d1a676
	https://git.kernel.org/stable/c/d640627663bfe7d8963c7615316d7d4ef60f3b0b