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 84C9125C707 for ; Fri, 2 May 2025 16:01:27 +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=1746201687; cv=none; b=ct/W/jEG9YzSiJyMbQPF0cdGt4AcpzexNNx/LDcqD9Y4HfYJBlAT6rv1m63Ixf0Ewp7o1bHMvMudwiQB05F17s1l82qU/f+fqRcuFMOS4bddl/vDr8FDJpHwopyZA8/JY/gs1WlQMGrROG8dcHonRaRRn+I4In9ePNlt1EHKG+s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746201687; c=relaxed/simple; bh=Vxa4ykeJ/ZCSdG3eUae8P2a+gBSaFwzAmWamK470VbQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=oipMLPjnzfhf7BofrO/j2eh62OiNq+qxpb4zhOq+9H8hGhzA1VJix8Z3MqTpJN04+zMv0F4saMVe6S/4xAvpLiYhDwHEOP21zEX2yCqoAEbBVKiYQoR0j2J9zDVnkDeAYtm4eg8lgTvAjskktB1YMO2qcHaLyqVYf0PT37iZCV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kiux7gp/; 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="kiux7gp/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7B36C4CEE4; Fri, 2 May 2025 16:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746201687; bh=Vxa4ykeJ/ZCSdG3eUae8P2a+gBSaFwzAmWamK470VbQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=kiux7gp/KdOcklgKG0sP2FZkAZIdLTPR5jfaukUd/vrkPym1N3zIBpKN9eNpFU+Zv S7wFCILqsJvNcM4gc3RHJBD+PAYZsAZE6PI820V07lHJmSxsN254MSdmJs1NTEMzjh 86X7HtIzERj9jBFT+iLVEz4VIypIG8kwf5GlxAso= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53136: af_unix: fix struct pid leaks in OOB support Date: Fri, 2 May 2025 17:56:41 +0200 Message-ID: <2025050236-CVE-2023-53136-74ee@gregkh> X-Mailer: git-send-email 2.49.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=3366; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=0Yf+DN9RHWHkRdGKt0K0S9XDp7SLQZvceli3+V71xEQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkir368fLT5ocuBDpObqx6cuG0vFXPNsbuAWfF6q5FhR IzVGfMXHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRbDGGBZv/fc03XzxV0upI zrr+n1W6NQuuXWFY0C4fWR3m907txdbFShtmTu9alhjTDQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: af_unix: fix struct pid leaks in OOB support syzbot reported struct pid leak [1]. Issue is that queue_oob() calls maybe_add_creds() which potentially holds a reference on a pid. But skb->destructor is not set (either directly or by calling unix_scm_to_skb()) This means that subsequent kfree_skb() or consume_skb() would leak this reference. In this fix, I chose to fully support scm even for the OOB message. [1] BUG: memory leak unreferenced object 0xffff8881053e7f80 (size 128): comm "syz-executor242", pid 5066, jiffies 4294946079 (age 13.220s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] alloc_pid+0x6a/0x560 kernel/pid.c:180 [] copy_process+0x169f/0x26c0 kernel/fork.c:2285 [] kernel_clone+0xf7/0x610 kernel/fork.c:2684 [] __do_sys_clone+0x7c/0xb0 kernel/fork.c:2825 [] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 [] entry_SYSCALL_64_after_hwframe+0x63/0xcd The Linux kernel CVE team has assigned CVE-2023-53136 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 314001f0bf927015e459c9d387d62a231fe93af3 and fixed in 5.15.103 with commit f3969427fb06a2c3cd6efd7faab63505cfa76e76 Issue introduced in 5.15 with commit 314001f0bf927015e459c9d387d62a231fe93af3 and fixed in 6.1.20 with commit ac1968ac399205fda9ee3b18f7de7416cb3a5d0d Issue introduced in 5.15 with commit 314001f0bf927015e459c9d387d62a231fe93af3 and fixed in 6.2.7 with commit a59d6306263c38e5c0592ea4451ca26a0778c947 Issue introduced in 5.15 with commit 314001f0bf927015e459c9d387d62a231fe93af3 and fixed in 6.3 with commit 2aab4b96900272885bc157f8b236abf1cdc02e08 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-53136 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/unix/af_unix.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/f3969427fb06a2c3cd6efd7faab63505cfa76e76 https://git.kernel.org/stable/c/ac1968ac399205fda9ee3b18f7de7416cb3a5d0d https://git.kernel.org/stable/c/a59d6306263c38e5c0592ea4451ca26a0778c947 https://git.kernel.org/stable/c/2aab4b96900272885bc157f8b236abf1cdc02e08