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 679281FB3CD for ; Mon, 21 Oct 2024 18:08:55 +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=1729534135; cv=none; b=TG2vQtKwAk1h0wrNg5vg/BUwiXdPs23Lx6T0i9w6rYyFzZomlxso2WZbTxg2BPDbYaM2Gds6IiKW1plsUYgjVrWs3LAICJuoxIoio2AUP7cR354EBW8jS8YHsCFLDgoG0vUcponQdzjIBhz7EmnLAR8uZzOIKQg4foTD2/Py87A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729534135; c=relaxed/simple; bh=L3r2Y4LqC9FuQ1L22e1xP3yQZsQyi9JkKUdrQDigMYw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dDwUWIySA7BE1v33dJV4Hm9D2M3D8OmRzDYXtt8oCL+rSS7uhtX2OExHLMSRCx9zpvA2diHsLK2axi+vJGW0j+3qBVn//rO/Jbqf4IDjPT4750UKTZDrne0H71tDW+F+pao1S544VySN9WUn+aVP3d6oLazCZxn3oI06CCAI1hI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ovZhncLV; 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="ovZhncLV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9FDAFC4CEC3; Mon, 21 Oct 2024 18:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729534135; bh=L3r2Y4LqC9FuQ1L22e1xP3yQZsQyi9JkKUdrQDigMYw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ovZhncLVrhaevhUa51DS0pszHaAudYWthKnIvQuia0jnrP5FQJWNve5dn4p2fStwR oRQYRniFGlkkjBlLgFtKVBOIUnkZjzpAOV1xXf4D3nEWbWwLdHj7Mqz3BQlGM4bu4+ 8rh/cF/BilVLaIa60wYsFgUEPcDRDKy0xxAdJBAY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-49995: tipc: guard against string buffer overrun Date: Mon, 21 Oct 2024 20:03:23 +0200 Message-ID: <2024102138-CVE-2024-49995-ec59@gregkh> X-Mailer: git-send-email 2.47.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=2668; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=L3r2Y4LqC9FuQ1L22e1xP3yQZsQyi9JkKUdrQDigMYw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOli05mE1izn+RWn2JIzc+lZNe8T2nzhjDMuNaxhlN31Z WF0CM+DjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIshqGebazz2SIfte3Fvzw 6MGh0k+8zyXnCjPMD52i5yh3yM3qy509uw8e4ziV9aV0FwA= 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: tipc: guard against string buffer overrun Smatch reports that copying media_name and if_name to name_parts may overwrite the destination. .../bearer.c:166 bearer_name_validate() error: strcpy() 'media_name' too large for 'name_parts->media_name' (32 vs 16) .../bearer.c:167 bearer_name_validate() error: strcpy() 'if_name' too large for 'name_parts->if_name' (1010102 vs 16) This does seem to be the case so guard against this possibility by using strscpy() and failing if truncation occurs. Introduced by commit b97bf3fd8f6a ("[TIPC] Initial merge") Compile tested only. The Linux kernel CVE team has assigned CVE-2024-49995 to this issue. Affected and fixed versions =========================== Fixed in 5.10.227 with commit e2b2558971e0 Fixed in 5.15.168 with commit 54dae0e9063e Fixed in 6.1.113 with commit 80c0be7bcf94 Fixed in 6.6.55 with commit 12d26aa7fd3c Fixed in 6.10.14 with commit 2ed7f42dfd3e Fixed in 6.11.3 with commit a18c7b239d02 Fixed in 6.12-rc1 with commit 6555a2a9212b 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-49995 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/tipc/bearer.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/e2b2558971e02ca33eb637a8350d68a48b3e8e46 https://git.kernel.org/stable/c/54dae0e9063ed23c9acf8d5ab9b18d3426a8ac18 https://git.kernel.org/stable/c/80c0be7bcf940ce9308311575c3aff8983c9b97a https://git.kernel.org/stable/c/12d26aa7fd3cbdbc5149b6e516563478d575026e https://git.kernel.org/stable/c/2ed7f42dfd3edb387034128ca5b0f639836d4ddd https://git.kernel.org/stable/c/a18c7b239d02aafb791ae2c45226f6bb40641792 https://git.kernel.org/stable/c/6555a2a9212be6983d2319d65276484f7c5f431a