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 7B3A231A551 for ; Wed, 24 Dec 2025 10:57:29 +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=1766573849; cv=none; b=eN6wxMxILUpCgc+wE/xI4qHNgw2+Y/70+maPHqKm2FnGZV+HoIGtiaxt2HCxRBkUlC+AsxyybhptC9ZAk0hZiVhBHKXJ47IcY3bjp+zoGCZ9nIVAjyo/cnogT8gqxZRe+L/tk1TTf66L5rUieDxALC6go2svDtl2eLzsKSaEhMk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766573849; c=relaxed/simple; bh=o96OqLPa+yXXCObCD07wm0R/mBtg/EZsH7r0J+SQusE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=BpweLw/vDv3DgK96X/e1z8CtVqR5qwi+HgI7RRBFk0AmmMG4UNphVKcxXgDG8yjvqgfKiPrpPfzgKwbk2YZ5FWKkLksDWBCSj0ifZcXBGzhXfk/CrARWOs3MFA6YB/K3tBQPh2OjM+1VLNJkUODSXJ74jYGaKKBmuzOHgAkHZFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FyUSFgBE; 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="FyUSFgBE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AE70C4CEFB; Wed, 24 Dec 2025 10:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766573849; bh=o96OqLPa+yXXCObCD07wm0R/mBtg/EZsH7r0J+SQusE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=FyUSFgBEHpjT5ZEXOOi1fzdbyiSj0YXXgeYwkaACIc09/pWRenBdX7hTP688Pcjdn kcCc7rg4Id6dNfrFeXz/rZQZsCZU09kfm2Mjw9hp554KNv94FT2yYobYRuiW5xZm5f SKTtJ4q/6WCOALllLEirp4QpeIWtrP1uymTzNd9g= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50705: io_uring/rw: defer fsnotify calls to task context Date: Wed, 24 Dec 2025 11:56:22 +0100 Message-ID: <2025122419-CVE-2022-50705-8196@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4843; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=4s26CSlLTZi7cDnYkSFP/BLUT5QTnDHl45zRrNyKNAE=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnex66cdlaxlz/67Xyw9MPd0vuEMlt83kZW/H2+ROaNR 7D6OekFHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRmyIM8x1F3Z0DWZTdWfur 7FeJcGf56fKzMCzYwf20NzFebYNST9a5Uw29q3/MOpkNAA== 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: io_uring/rw: defer fsnotify calls to task context We can't call these off the kiocb completion as that might be off soft/hard irq context. Defer the calls to when we process the task_work for this request. That avoids valid complaints like: stack backtrace: CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.0.0-rc6-syzkaller-00321-g105a36f3694e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:3961 [inline] valid_state kernel/locking/lockdep.c:3973 [inline] mark_lock_irq kernel/locking/lockdep.c:4176 [inline] mark_lock.part.0.cold+0x18/0xd8 kernel/locking/lockdep.c:4632 mark_lock kernel/locking/lockdep.c:4596 [inline] mark_usage kernel/locking/lockdep.c:4527 [inline] __lock_acquire+0x11d9/0x56d0 kernel/locking/lockdep.c:5007 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __fs_reclaim_acquire mm/page_alloc.c:4674 [inline] fs_reclaim_acquire+0x115/0x160 mm/page_alloc.c:4688 might_alloc include/linux/sched/mm.h:271 [inline] slab_pre_alloc_hook mm/slab.h:700 [inline] slab_alloc mm/slab.c:3278 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x39/0x520 mm/slab.c:3491 fanotify_alloc_fid_event fs/notify/fanotify/fanotify.c:580 [inline] fanotify_alloc_event fs/notify/fanotify/fanotify.c:813 [inline] fanotify_handle_event+0x1130/0x3f40 fs/notify/fanotify/fanotify.c:948 send_to_group fs/notify/fsnotify.c:360 [inline] fsnotify+0xafb/0x1680 fs/notify/fsnotify.c:570 __fsnotify_parent+0x62f/0xa60 fs/notify/fsnotify.c:230 fsnotify_parent include/linux/fsnotify.h:77 [inline] fsnotify_file include/linux/fsnotify.h:99 [inline] fsnotify_access include/linux/fsnotify.h:309 [inline] __io_complete_rw_common+0x485/0x720 io_uring/rw.c:195 io_complete_rw+0x1a/0x1f0 io_uring/rw.c:228 iomap_dio_complete_work fs/iomap/direct-io.c:144 [inline] iomap_dio_bio_end_io+0x438/0x5e0 fs/iomap/direct-io.c:178 bio_endio+0x5f9/0x780 block/bio.c:1564 req_bio_endio block/blk-mq.c:695 [inline] blk_update_request+0x3fc/0x1300 block/blk-mq.c:825 scsi_end_request+0x7a/0x9a0 drivers/scsi/scsi_lib.c:541 scsi_io_completion+0x173/0x1f70 drivers/scsi/scsi_lib.c:971 scsi_complete+0x122/0x3b0 drivers/scsi/scsi_lib.c:1438 blk_complete_reqs+0xad/0xe0 block/blk-mq.c:1022 __do_softirq+0x1d3/0x9c6 kernel/softirq.c:571 invoke_softirq kernel/softirq.c:445 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:650 irq_exit_rcu+0x5/0x20 kernel/softirq.c:662 common_interrupt+0xa9/0xc0 arch/x86/kernel/irq.c:240 The Linux kernel CVE team has assigned CVE-2022-50705 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.54 with commit df1ec53252d5b5b26ea49e30438741c9a6d89857 and fixed in 5.15.90 with commit 89a410dbd0f159ddd308f19d6eb682fc753e4771 Issue introduced in 5.18 with commit f63cf5192fe3418ad5ae1a4412eba5694b145f79 and fixed in 6.0.3 with commit 2a853c206e553dd9c0a55c22858fd6a446d93e15 Issue introduced in 5.18 with commit f63cf5192fe3418ad5ae1a4412eba5694b145f79 and fixed in 6.1 with commit b000145e9907809406d8164c3b2b8861d95aecd1 Issue introduced in 5.16.19 with commit dfbe550c8235b7e98284db37eeeddfd3b4b19b00 Issue introduced in 5.17.2 with commit b436d1e92662adecafff4c95baae6352289c2d80 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-50705 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: io_uring/rw.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/89a410dbd0f159ddd308f19d6eb682fc753e4771 https://git.kernel.org/stable/c/2a853c206e553dd9c0a55c22858fd6a446d93e15 https://git.kernel.org/stable/c/b000145e9907809406d8164c3b2b8861d95aecd1