CVE-2023-53273: Drivers: vmbus: Check for channel allocation before looking up relids
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
Drivers: vmbus: Check for channel allocation before looking up relids
relid2channel() assumes vmbus channel array to be allocated when called. However, in cases such as kdump/kexec, not all relids will be reset by the host. When the second kernel boots and if the guest receives a vmbus interrupt during vmbus driver initialization before vmbus_connect() is called, before it finishes, or if it fails, the vmbus interrupt service routine is called which in turn calls relid2channel() and can cause a null pointer dereference.
Print a warning and error out in relid2channel() for a channel id that's invalid in the second kernel.
The Linux kernel CVE team has assigned CVE-2023-53273 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.8 with commit 8b6a877c060ed6b86878fe66c7c6493a6054cf23 and fixed in 5.10.178 with commit 176c6b4889195fbe7016d9401175b48c5c9edf68 Issue introduced in 5.8 with commit 8b6a877c060ed6b86878fe66c7c6493a6054cf23 and fixed in 5.15.107 with commit c373e49fbb87aa177819866ed9194ebc5414dfd6 Issue introduced in 5.8 with commit 8b6a877c060ed6b86878fe66c7c6493a6054cf23 and fixed in 6.1.24 with commit 8c3f0ae5435fd20bb1e3a8308488aa6ac33151ee Issue introduced in 5.8 with commit 8b6a877c060ed6b86878fe66c7c6493a6054cf23 and fixed in 6.2.11 with commit a5c44f3446a0565139b7d8abc78f58b86c398123 Issue introduced in 5.8 with commit 8b6a877c060ed6b86878fe66c7c6493a6054cf23 and fixed in 6.3 with commit 1eb65c8687316c65140b48fad27133d583178e15
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-2023-53273
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:
drivers/hv/connection.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/176c6b4889195fbe7016d9401175b48c5c9edf68 https://git.kernel.org/stable/c/c373e49fbb87aa177819866ed9194ebc5414dfd6 https://git.kernel.org/stable/c/8c3f0ae5435fd20bb1e3a8308488aa6ac33151ee https://git.kernel.org/stable/c/a5c44f3446a0565139b7d8abc78f58b86c398123 https://git.kernel.org/stable/c/1eb65c8687316c65140b48fad27133d583178e15