blob: d97c915410dc8ae0e9a27446880315c779bac12f [file] [log] [blame]
From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: <linux-cve-announce@vger.kernel.org>
Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: CVE-2024-38585: tools/nolibc/stdlib: fix memory error in realloc()
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
tools/nolibc/stdlib: fix memory error in realloc()
Pass user_p_len to memcpy() instead of heap->len to prevent realloc()
from copying an extra sizeof(heap) bytes from beyond the allocated
region.
The Linux kernel CVE team has assigned CVE-2024-38585 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.19 with commit 0e0ff638400be8f497a35b51a4751fd823f6bd6a and fixed in 6.1.93 with commit 5996b2b2dac739f2a27da13de8eee5b85b2550b3
Issue introduced in 5.19 with commit 0e0ff638400be8f497a35b51a4751fd823f6bd6a and fixed in 6.6.33 with commit f678c3c336559cf3255a32153e9a17c1be4e7c15
Issue introduced in 5.19 with commit 0e0ff638400be8f497a35b51a4751fd823f6bd6a and fixed in 6.8.12 with commit 8019d3dd921f39a237a9fab6d2ce716bfac0f983
Issue introduced in 5.19 with commit 0e0ff638400be8f497a35b51a4751fd823f6bd6a and fixed in 6.9.3 with commit 4e6f225aefeb712cdb870176b6621f02cf235b8c
Issue introduced in 5.19 with commit 0e0ff638400be8f497a35b51a4751fd823f6bd6a and fixed in 6.10 with commit 791f4641142e2aced85de082e5783b4fb0b977c2
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-2024-38585
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:
tools/include/nolibc/stdlib.h
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/5996b2b2dac739f2a27da13de8eee5b85b2550b3
https://git.kernel.org/stable/c/f678c3c336559cf3255a32153e9a17c1be4e7c15
https://git.kernel.org/stable/c/8019d3dd921f39a237a9fab6d2ce716bfac0f983
https://git.kernel.org/stable/c/4e6f225aefeb712cdb870176b6621f02cf235b8c
https://git.kernel.org/stable/c/791f4641142e2aced85de082e5783b4fb0b977c2