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 DF6CEC2ED for ; Thu, 7 Nov 2024 09:35:30 +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=1730972131; cv=none; b=a9ISrZyCb46mK06rge7faV2Hleu2zvx1KP6VP2NujAIlSSoeeXUl/6Cf8Tf9cdYog/HY7ZyNRkJEDb3ATYMsK4/y3KcHoBBN7MYWF9nRWELzdKQSiE4hzBYO6xKSh/ycHrgKVIkSC+/EkHvGgxJkKorrTEKsoWpJnyHI3KF95hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730972131; c=relaxed/simple; bh=tKH6+E33Ib24UdGncNcCXWM57K1vNx4Ycx2g7VAU53M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=MMbR2mEBbfp8f0JR4opOzTXy2y1tBweK8T1YlTquvrvt3f0vo3tejNeT2gucJ4gF5yR9kh21MfATkdj7PXfZl2wNN27+IqN2ZHcJspCdR+lwyprHYmr0lY2ygt5bl7ctS5CsZ8HiPPxblhdwAMd7sCuE7tjNknXYHAa+DOwng6c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yqTVLwwj; 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="yqTVLwwj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F23A0C4CECC; Thu, 7 Nov 2024 09:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730972130; bh=tKH6+E33Ib24UdGncNcCXWM57K1vNx4Ycx2g7VAU53M=; h=From:To:Cc:Subject:Date:Reply-to:From; b=yqTVLwwj4HsPNHGAl3hwccxVE3V1IhyJ06pCLVrywWyBPDlEsJdREdXNEiAuQ/rUW 1iGgL3WnaKNh14utWJpS/j/XrgDRQuaLC27oKLyYe/QtUiSOcYt/s0DPZ4Trlrmosp 6w4e3RPMa7+IovIErgZTJXXIjXbTYJfD8fTczbP4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50152: smb: client: fix possible double free in smb2_set_ea() Date: Thu, 7 Nov 2024 10:34:52 +0100 Message-ID: <2024110745-CVE-2024-50152-535e@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=2415; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tKH6+E33Ib24UdGncNcCXWM57K1vNx4Ycx2g7VAU53M=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk6nVsfH3581DzF6/vMDSpZK08cVN+9uk4ufPfre/nB8 yLY1GuPdcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEEgIY5ocqG+TuCX1WUWG3 ddPU40wzY9Zc+sMwP65XM9tTrmyu4N+Nq3bFuuZsfyR6BAA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: smb: client: fix possible double free in smb2_set_ea() Clang static checker(scan-build) warning: fs/smb/client/smb2ops.c:1304:2: Attempt to free released memory. 1304 | kfree(ea); | ^~~~~~~~~ There is a double free in such case: 'ea is initialized to NULL' -> 'first successful memory allocation for ea' -> 'something failed, goto sea_exit' -> 'first memory release for ea' -> 'goto replay_again' -> 'second goto sea_exit before allocate memory for ea' -> 'second memory release for ea resulted in double free'. Re-initialie 'ea' to NULL near to the replay_again label, it can fix this double free problem. The Linux kernel CVE team has assigned CVE-2024-50152 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.32 with commit 433042a91f93 and fixed in 6.6.59 with commit b1813c220b76 Issue introduced in 6.8 with commit 4f1fffa23769 and fixed in 6.11.6 with commit c9f758ecf256 Issue introduced in 6.8 with commit 4f1fffa23769 and fixed in 6.12-rc4 with commit 19ebc1e6cab3 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-50152 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: fs/smb/client/smb2ops.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/b1813c220b76f60b1727984794377c4aa849d4c1 https://git.kernel.org/stable/c/c9f758ecf2562dfdd4adf12c22921b5de8366123 https://git.kernel.org/stable/c/19ebc1e6cab334a8193398d4152deb76019b5d34