Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69EC3165EE2 for ; Wed, 18 Sep 2024 07:19:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726643972; cv=none; b=WGWDwesRJ8+G2C2BpDT/pN+bc9RHs4v+Qu8PAZ04LHxJlTDNGyQDZdx2HCIu0i+11V0ewrdUtJVYcGiWp+2CHAIl3zDlJkCzCnwbk1w6/nceSVKIf/APh5rRmIQVARcajS1TN+JTsVQO0wO77PhNOPcPUItfELfI6HhMJSUnbuA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726643972; c=relaxed/simple; bh=LB+WV+y0zoyZmpOXOXg16PmhNFuFnAN7MmS3QJXzJBM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qikzyltTtU9zPlDk9ltH/L4Jsb15oKr6oHRLVVILCMyv2U54kSB1oZA0U+Lkpvs7twDeGsAa+iawmH+gONjdv+kGjsi7RxTBGEK2DjNoOV0+V2eZDAzaGM6WjPLqgF/dZoVGjpGVrAv4NvdrMPY5F7jMPb5xvfidqbIif0C0r5s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=y+VbpUXq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="y+VbpUXq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9CF66C4CEC3; Wed, 18 Sep 2024 07:19:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1726643972; bh=LB+WV+y0zoyZmpOXOXg16PmhNFuFnAN7MmS3QJXzJBM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=y+VbpUXq+q05N2M1IA82K/Vu2bswfdmIrS0CAR1NNaOX5q7RyWUymp6sAMdcZxZTe R8XZG4FP9BJUvLpjaj5rJ2aBCemO/4yrVNTbZBPooBbfo0oQFnx/71MNTjSgc2Qsga wiZvUhfad7Tnp+nv+/aywuxVHMFLO/ffpdQUZxoA= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-46764: bpf: add check for invalid name in btf_name_valid_section() Date: Wed, 18 Sep 2024 09:16:59 +0200 Message-ID: <2024091843-CVE-2024-46764-2d5c@gregkh> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=1961; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=LB+WV+y0zoyZmpOXOXg16PmhNFuFnAN7MmS3QJXzJBM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmv6qIVzy+bPyNtsXLp/YDrodVThdibA7xW8BcpKF/Z8 6Ol5WVnRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExE9yPDgmmLv4uKOrcIRAht lTCc9+mV54l/XxkWdM3fdepvTEn87JkFD0S6KgQr7H9cBwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: bpf: add check for invalid name in btf_name_valid_section() If the length of the name string is 1 and the value of name[0] is NULL byte, an OOB vulnerability occurs in btf_name_valid_section() and the return value is true, so the invalid name passes the check. To solve this, you need to check if the first position is NULL byte and if the first character is printable. The Linux kernel CVE team has assigned CVE-2024-46764 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit bd70a8fb7ca4 and fixed in 6.10.10 with commit c8ffe2d4d37a Issue introduced in 6.9 with commit bd70a8fb7ca4 and fixed in 6.11 with commit bb6705c3f93b 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-46764 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: kernel/bpf/btf.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/c8ffe2d4d37a05ce18c71b87421443c16f8475e5 https://git.kernel.org/stable/c/bb6705c3f93bed2af03d43691743d4c43e3c8e6f