CVE-2023-53705: ipv6: Fix out-of-bounds access in ipv6_find_tlv()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ipv6: Fix out-of-bounds access in ipv6_find_tlv()
optlen is fetched without checking whether there is more than one byte to parse. It can lead to out-of-bounds access.
Found by InfoTeCS on behalf of Linux Verification Center (linuxtesting.org) with SVACE.
The Linux kernel CVE team has assigned CVE-2023-53705 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 4.14.316 with commit 59e656d0d4a84ea0ee9a39c6f69160a3effccc94 Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 4.19.284 with commit 04bf69e3de435d793a203aacc4b774f8f9f2baeb Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 5.4.244 with commit 011f47c8b8389154f996f5f69da8efc3a3beefef Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 5.10.181 with commit e5f82688ae10f5f386952e65e941bb8868ee54dc Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 5.15.114 with commit 9b92e2d0eb696d7586ba832c8854653b59887da0 Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 6.1.31 with commit 91dd8aab9c9f193210681b86b6b92840ffe74f0c Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 6.3.5 with commit ae68c0f7edbc9a294094ce03a0aaf45aa489ce40 Issue introduced in 2.6.19 with commit c61a404325093250b676f40ad8f4dd00f3bcab5f and fixed in 6.4 with commit 878ecb0897f4737a4c9401f3523fd49589025671
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-53705
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/ipv6/exthdrs_core.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/59e656d0d4a84ea0ee9a39c6f69160a3effccc94 https://git.kernel.org/stable/c/04bf69e3de435d793a203aacc4b774f8f9f2baeb https://git.kernel.org/stable/c/011f47c8b8389154f996f5f69da8efc3a3beefef https://git.kernel.org/stable/c/e5f82688ae10f5f386952e65e941bb8868ee54dc https://git.kernel.org/stable/c/9b92e2d0eb696d7586ba832c8854653b59887da0 https://git.kernel.org/stable/c/91dd8aab9c9f193210681b86b6b92840ffe74f0c https://git.kernel.org/stable/c/ae68c0f7edbc9a294094ce03a0aaf45aa489ce40 https://git.kernel.org/stable/c/878ecb0897f4737a4c9401f3523fd49589025671