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 06150333AA8 for ; Wed, 17 Sep 2025 14:56:36 +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=1758120997; cv=none; b=QCj3hjKyh1iXF+Epm5bgVMoNqVC7RvlC5H/XHAb7o5XXovjRD+ZuxmS3Et24MH7PIzRyBVtTqMAOHZX5POMIWO/G0O9LT0EbB2HaJBsGBrft1VOUE188G5FsLj9ZQSKmGggka/CAZtD6g2qyhc18atHgTGy8lGaAj1MlOQDtMvg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758120997; c=relaxed/simple; bh=RG45tcDekT+hZNYN7CwbWCmuOtpwL1nzj/SsRoBKqfo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hKWXbV/5HstW8sW/hF4nlR80RXPh8OtjilWzxB0YCAl+VmOGU22ugi3J3IJXoDtPwYgt2J1YiszKxXNOIye+UWyFWAehikjNCdMwdFD+ap5P+hJLYbvZTqoQgByBXwm9WP5VyF1EBxjg5eHvuvIr1FEU/H//1k4nBeOcz55fkxg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=idGnaxBd; 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="idGnaxBd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 207EDC4CEF7; Wed, 17 Sep 2025 14:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758120996; bh=RG45tcDekT+hZNYN7CwbWCmuOtpwL1nzj/SsRoBKqfo=; h=From:To:Cc:Subject:Date:Reply-to:From; b=idGnaxBdKvK2oTH24ln4ea8fXPNpoiO9YA4bKGLym2lSTNSBmFED6/+Re8DuYQFJy Ebc6P8B8f7ladSOjIqMHF+Qm+/vzSAu8pvS7GC+OwRPFCEpfBajSfUZJyhYT6Ka8s3 6jbzbuVboIFhdBG8G1Zf4N2r13ojOQf8Rfp5Zy3g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50363: skmsg: pass gfp argument to alloc_sk_msg() Date: Wed, 17 Sep 2025 16:56:22 +0200 Message-ID: <2025091715-CVE-2022-50363-7e9b@gregkh> X-Mailer: git-send-email 2.51.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=3856; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=1GmrYvVDAu3ggS0zj/A7LwZ7N1EYFl+jedVJtPAffFE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmnzvDPWnV384nZnk+qzGr8bavkdu8/rxvGt9labZV8/ ve+fJG0jlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZiIQQXDfH9e+8grcziYAzZV c2w3mrigY6JoKsOC/SUHmLdrF1hNn9Zle9ORTSRQ6LcOAA== 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: skmsg: pass gfp argument to alloc_sk_msg() syzbot found that alloc_sk_msg() could be called from a non sleepable context. sk_psock_verdict_recv() uses rcu_read_lock() protection. We need the callers to pass a gfp_t argument to avoid issues. syzbot report was: BUG: sleeping function called from invalid context at include/linux/sched/mm.h:274 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 3613, name: syz-executor414 preempt_count: 0, expected: 0 RCU nest depth: 1, expected: 0 INFO: lockdep is turned off. CPU: 0 PID: 3613 Comm: syz-executor414 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 __might_resched+0x538/0x6a0 kernel/sched/core.c:9877 might_alloc include/linux/sched/mm.h:274 [inline] slab_pre_alloc_hook mm/slab.h:700 [inline] slab_alloc_node mm/slub.c:3162 [inline] slab_alloc mm/slub.c:3256 [inline] kmem_cache_alloc_trace+0x59/0x310 mm/slub.c:3287 kmalloc include/linux/slab.h:600 [inline] kzalloc include/linux/slab.h:733 [inline] alloc_sk_msg net/core/skmsg.c:507 [inline] sk_psock_skb_ingress_self+0x5c/0x330 net/core/skmsg.c:600 sk_psock_verdict_apply+0x395/0x440 net/core/skmsg.c:1014 sk_psock_verdict_recv+0x34d/0x560 net/core/skmsg.c:1201 tcp_read_skb+0x4a1/0x790 net/ipv4/tcp.c:1770 tcp_rcv_established+0x129d/0x1a10 net/ipv4/tcp_input.c:5971 tcp_v4_do_rcv+0x479/0xac0 net/ipv4/tcp_ipv4.c:1681 sk_backlog_rcv include/net/sock.h:1109 [inline] __release_sock+0x1d8/0x4c0 net/core/sock.c:2906 release_sock+0x5d/0x1c0 net/core/sock.c:3462 tcp_sendmsg+0x36/0x40 net/ipv4/tcp.c:1483 sock_sendmsg_nosec net/socket.c:714 [inline] sock_sendmsg net/socket.c:734 [inline] __sys_sendto+0x46d/0x5f0 net/socket.c:2117 __do_sys_sendto net/socket.c:2129 [inline] __se_sys_sendto net/socket.c:2125 [inline] __x64_sys_sendto+0xda/0xf0 net/socket.c:2125 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The Linux kernel CVE team has assigned CVE-2022-50363 to this issue. Affected and fixed versions =========================== Issue introduced in 6.0 with commit 43312915b5ba20741617dd2119e835205fa8580c and fixed in 6.0.6 with commit 693ddd6ffc05b228ea1638f9d757c5d3541f9446 Issue introduced in 6.0 with commit 43312915b5ba20741617dd2119e835205fa8580c and fixed in 6.1 with commit 2d1f274b95c6e4ba6a813b3b8e7a1a38d54a0a08 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-2022-50363 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/core/skmsg.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/693ddd6ffc05b228ea1638f9d757c5d3541f9446 https://git.kernel.org/stable/c/2d1f274b95c6e4ba6a813b3b8e7a1a38d54a0a08