From mboxrd@z Thu Jan 1 00:00:00 1970 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 26F1F1C07D8 for ; Fri, 31 Jan 2025 11:32:00 +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=1738323120; cv=none; b=ZTIv+pjZa7j5Pt3sxOtnQYGTCqcSUuzduSkswyNIJzipzsdM56b9IbQC2tWV8ov3ziXPNpG/TcNJuFYSajQ2BV0Si7T/SNiKR38EF+f8hwn/7WKSvRdjYawJStHMfoow7F2qaaRRE2dUPbytBwdFn9Gmd4wGtEkXvyZN36tS4gs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738323120; c=relaxed/simple; bh=qbf658LX3ruwZQd8LneA3tFmKeggHXD7XTLTlNh9KS4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CQK4Bn6eXI3J1oWrJyj6HnLkDJ7aI7XSw2x8si5ICKL6C6iJOnkH/UFsE1ajruBZNm59l0JzD7o9X+/qohBVngiBD1QSDWu8XQ9+1zZqlSF1qqWP+UOztux2RKnpw9n6j5R2fsFpbfZL3gLCQzSNExNOXVnJRaOPweORC5/ea2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=iRF1jqzY; 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="iRF1jqzY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F3D7C4CED1; Fri, 31 Jan 2025 11:31:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1738323120; bh=qbf658LX3ruwZQd8LneA3tFmKeggHXD7XTLTlNh9KS4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=iRF1jqzYKFUnUTQMHGq+PLgXtfzK/ge+phARTaTRsqeWvNE8R5OTuHZXmRgiUxt1m gJl88xKpikUFHeKxMB/Wmr2gAc+n+Fy9Tj6dclhkiALEaWzd/EupNKxopcRPa0QMI+ jb33hNb0IeUGKNPQMR/uWwJZN7c1gm53qKm1noNk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21672: afs: Fix merge preference rule failure condition Date: Fri, 31 Jan 2025 12:31:04 +0100 Message-ID: <2025013100-CVE-2025-21672-cd35@gregkh> X-Mailer: git-send-email 2.48.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=2475; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qbf658LX3ruwZQd8LneA3tFmKeggHXD7XTLTlNh9KS4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlztpQIJkxSEl3NUHqLc8+88NsRpxKEgh5rCvPqFYqJL 1bd976yI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaiUckwT/nbvedzrzUouQVP i19yUOFdpuxhc4YFZ5KmNb3d5t6blSn558HsjRL5i8O3AAA= 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: afs: Fix merge preference rule failure condition syzbot reported a lock held when returning to userspace[1]. This is because if argc is less than 0 and the function returns directly, the held inode lock is not released. Fix this by store the error in ret and jump to done to clean up instead of returning directly. [dh: Modified Lizhi Xu's original patch to make it honour the error code from afs_split_string()] [1] WARNING: lock held when returning to user space! 6.13.0-rc3-syzkaller-00209-g499551201b5f #0 Not tainted ------------------------------------------------ syz-executor133/5823 is leaving the kernel with locks still held! 1 lock held by syz-executor133/5823: #0: ffff888071cffc00 (&sb->s_type->i_mutex_key#9){++++}-{4:4}, at: inode_lock include/linux/fs.h:818 [inline] #0: ffff888071cffc00 (&sb->s_type->i_mutex_key#9){++++}-{4:4}, at: afs_proc_addr_prefs_write+0x2bb/0x14e0 fs/afs/addr_prefs.c:388 The Linux kernel CVE team has assigned CVE-2025-21672 to this issue. Affected and fixed versions =========================== Fixed in 6.12.11 with commit 22be1d90a6211c88dd093b25d1f3aa974d0d9f9d Fixed in 6.13 with commit 17a4fde81d3a7478d97d15304a6d61094a10c2e3 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-2025-21672 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/afs/addr_prefs.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/22be1d90a6211c88dd093b25d1f3aa974d0d9f9d https://git.kernel.org/stable/c/17a4fde81d3a7478d97d15304a6d61094a10c2e3