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 B71B6144D1F for ; Tue, 21 May 2024 15:35:07 +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=1716305707; cv=none; b=jKeE5kkAYRtS4ZxlNE0ekjj1XA1e6i2X3ZXMtbIiVKe4TmkmwNIFSwZhwrPg9sPutprQDhBKEHP+VzqJEE0tpp+6r/0zi4JyB1t7pCZEXaPPhhHnJrqzXter2hes6D5uIkVRD8MKmvPg1UYni12KTuoNvnYS8iWU7UHms7Rrshc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716305707; c=relaxed/simple; bh=hmtNBAhI+RE4NlBqG8JdJm6PsB8ccSQFzVwzEQG+L1E=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nLMLhGB5ycZwikXrrgjwcp9N5WCquVpdFg74jQT8BJBOOkBUJjP80eUd8uOrbmXC7aYZUbKn1PxU8erzOEj+ct2VQxk9AOmjnpzWr7XLnfwdgnRCzERhyBoXjYw86uHvKVsn4WSuS7/Gvnyg20UcGrHutDzK/0l9uws70lp/Rzg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ExgmeX8l; 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="ExgmeX8l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB6E1C2BD11; Tue, 21 May 2024 15:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716305707; bh=hmtNBAhI+RE4NlBqG8JdJm6PsB8ccSQFzVwzEQG+L1E=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ExgmeX8l3rjYumlwrI8AEMrcItS3Rd8F2S/XSQvwk34ZaCiVdVNVvHwRugQESl8+K WATBulvGV7QbeBAV30s1VmZJbPIMi5UNv93jWQYapAa4Nbpsb+aF5XWEw9BOixkGSv MfkTnLxbADZ47tCs1FKOLFXHrdgjdukvLnPIsovw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-52779: fs: Pass AT_GETATTR_NOSEC flag to getattr interface function Date: Tue, 21 May 2024 17:31:15 +0200 Message-ID: <2024052153-CVE-2023-52779-59e8@gregkh> X-Mailer: git-send-email 2.45.1 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=2713; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=hmtNBAhI+RE4NlBqG8JdJm6PsB8ccSQFzVwzEQG+L1E=; b=owGbwMvMwCRo6H6F97bub03G02pJDGk++3RV/yZ03n3iNO3rq+srWeLSk+6en3StxMPT8flCc 6MO9R3rO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiAgYMCxYn8VmkpcooBZZo Ld9o6ZY+Zb2wKMM8HSF1Ryb9xR2Kxj9kas/MNjsSkR0DAA== 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: fs: Pass AT_GETATTR_NOSEC flag to getattr interface function When vfs_getattr_nosec() calls a filesystem's getattr interface function then the 'nosec' should propagate into this function so that vfs_getattr_nosec() can again be called from the filesystem's gettattr rather than vfs_getattr(). The latter would add unnecessary security checks that the initial vfs_getattr_nosec() call wanted to avoid. Therefore, introduce the getattr flag GETATTR_NOSEC and allow to pass with the new getattr_flags parameter to the getattr interface function. In overlayfs and ecryptfs use this flag to determine which one of the two functions to call. In a recent code change introduced to IMA vfs_getattr_nosec() ended up calling vfs_getattr() in overlayfs, which in turn called security_inode_getattr() on an exiting process that did not have current->fs set anymore, which then caused a kernel NULL pointer dereference. With this change the call to security_inode_getattr() can be avoided, thus avoiding the NULL pointer dereference. The Linux kernel CVE team has assigned CVE-2023-52779 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit db1d1e8b9867 and fixed in 6.6.4 with commit 3fb0fa086419 Issue introduced in 6.5 with commit db1d1e8b9867 and fixed in 6.7 with commit 8a924db2d7b5 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-52779 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/ecryptfs/inode.c fs/overlayfs/inode.c fs/overlayfs/overlayfs.h fs/stat.c include/uapi/linux/fcntl.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/3fb0fa08641903304b9d81d52a379ff031dc41d4 https://git.kernel.org/stable/c/8a924db2d7b5eb69ba08b1a0af46e9f1359a9bdf