From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.50 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796512218; b=U2i+2dxJRhZj0lkfae7QzGVg4woBgne7vPev7Ffail9yWmcezabA+PdwmlaS7ulV3bFY xEajjAUYQ2PlG85v9VGksfBv0MR2s1y2vohG8WS4PvvTuwj75kGLV1jZS9cIv7PQOEkDe pKSZ6FBS8mbE9RP5jZ6QSK3bFTwNMsB55BiwpWJRSbaVlDKwSYwBn1Me2FUUuhEJElDTP m1apILaSIKUj1Ktfp15xhDt3oRc7QTY0ViNDACj4GyJ2bw0DkvJ2VHmn0/eyvrlc6sNa6 P4FmNEa/XPqoYlKV3AyYIGSdaHWoYCI5bpEuvGeq2fR5/XtTeQMQhpGqNvhd68Qnp7A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796512218; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=dIArM64qXPY6PKS0uqHiVACwsVgP7N4mA6+/UGS2/U4=; b=e/9vsr+Ox7Niqb7wYBDSJ9VThD9ZjVn6YGP4oh3Dusvy6wARGhS69X8UsE3YGs7NnQhd fVEdMI5/VX13lFnhRG3ivWo0Isg2SiVU1hRJn8elGLyFYTbi4bXVzMswWuIjqpsyfSYpy CTjHf7nmkOdqWJ9AyRtT5IZuvgdux4TKlOZhcXEzc76Y5UOgfS4ggZnHQE8YFWXhI0WIK Zs/J58ODU6Zygd4peSxifzOd61S9FlPYp/3iNBk9bfYly7fDvXxKTY0an0DA+fvWNRqN9 A2EiGh62ehsH8hq7d1QlWeR6LgXLv3FfW2lRqzpK68UXoAJWH8uahsutLH7p4Hc76CA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass header.d=kernel.dk header.i=@kernel.dk header.a=rsa-sha256 header.s=google header.b=IoBQDARd; arc=none smtp.remote-ip=209.85.210.50 Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF86E606A322 for ; Sat, 5 Dec 2026 23:10:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DF86E606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.dk header.i=@kernel.dk header.a=rsa-sha256 header.s=google header.b=IoBQDARd Received: by mail-ot1-f50.google.com with SMTP id 46e09a7af769-8253bc5a613so1480251a34.0 for ; Sat, 05 Dec 2026 15:10:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.dk; s=google; t=1796512216; x=1797117016; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=dIArM64qXPY6PKS0uqHiVACwsVgP7N4mA6+/UGS2/U4=; b=IoBQDARdz4cYknKRcP5cdMqedDf9fnxEH8VhF/rWim256Y4QMJmBNpKg0chu6TX3PP P0i0QC639RJnPj+GeEJyY30NesDpJjXfVkhw+8DhI3C8I7WPLcxBwRMpM0J4uOa9SVHv 97p50zZQO8zKwv4rNA08uX7n9lyS321cEgMz5wHpibUp5sou88t/WKYrLUiwNLTFGPk7 fotHzTwM2PVLVg+uzkGNByaAmfsHII0Fb9Hea1XCEDav/TU2N+YItDz4qe9znLc+gHSq GAyqBkXRgVOhbLGH24Is+chmt/YvkreTPMTys6odk/tWQJmUXvqSYwmSvmNGCzq7Y2Up 2NoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796512216; x=1797117016; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=dIArM64qXPY6PKS0uqHiVACwsVgP7N4mA6+/UGS2/U4=; b=AjyPxhqCR/fhMlpbn3IQlJJq0Or0JaoxIjF+gO4cqYxZ+Li/+hw3I/rzbbLKBmM1JD MYiJdpn1vbsN2UeiULI8qFWAOBAvxsxyylLYHF7QcbGAFUlkMVBTxZBVhq28z329i7Ta 2KVkmNW4Pi+JmyFc5X8DciXi1Ou91BV9dTXGrqHna3nzueSQAn4URZXN5tdBSQpeF6bj bJR0ABR0xxQYN3dzTlSe8H4IWLJXMHuwI8rVxYFYySFOnCNkd1ONvJOQScROIpmaaHMR wrKbr+J6xYCSo1fluAKIKfGmkdFTJPkUkVpgMeqSl/KOTzyrSfFmhr+2Xu0nFY9EElW2 EJIg== X-Gm-Message-State: APuU4Z8yMCSjhsTsVM+76Q8oeK9Gj8NaH4lgv4QBPBhbsoWfOjArcDDp BWFZwC9MVwQn84lGRKUVkPigYnxMhFvYS1XX9KvrtnKPGL5RJixDJ19jfIoKFVIZL2vBGnh84J6 ErqI11ls= X-Gm-Gg: AZFdTZcz54y5TWvKHaIp4UgfcKtV3EJ3RkJs6OYkTM5UURkRyeq75TJPrJjopEq0CG5 DUoHbzCLkN5niIf4QYijZkCsQ4THFO7eVRHgCDJ1b6yAdcta1pzeJeocu4DtUlOasB9xL/JhIod Q4bsjuXiv5b9+vUrIMmaj8DG8j5FIdJH5iOvMim+ZszJSRwkfLjds4q9MlvKnueKIvnpMhMet1z mk4KwRRIQ19ec286bKrSyGw/LtO0ouOTZi6ibpae9TA48rP1/lOA1DJUS4h2IHxM8w7RY/92+Oq 7MT26h85s6WMaVNYl+o1uObSZozVUNN9Y9KKEqvtXChUAtTYWWwusp4ntsqlh3HbQUXJSAr8EC+ ooqOnbhEE8kK5zM2PBea2u4g6ToSnlnjNI1eqkurBPi7ShrnyWpmjZ489Ibc2Ps8a9VEwskrj8H h/ye7uvratMs3LlLM3m1jeFRS/TpxhaR2pXaa76PxLKi8C213JHHChS8A+uEVmgqJkK+bP9p589 k7nF0yc2n8/krLcaJrtowj1WGRN5wa73s77gen2b5W22i132xtL+L5dTTS+SxVakgUMZcKFwzIq /GZUH9t47yv44meji7QwuDFHEEPo9QlMM8o2m0kiqOsHeagauEo0bd5yjLjyxk/xnWbFzuADUad jyMDSRPz5U8UP91F60Oq3aKYiqEWBPrtnuSkG X-Received: by 2002:a05:6830:230a:b0:81a:adf1:ae71 with SMTP id 46e09a7af769-863f89142e5mr7046319a34.4.1796512215732; Sat, 05 Dec 2026 15:10:15 -0800 (PST) Received: from r7625 ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-863f8313082sm6309624a34.16.2026.12.05.15.10.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2026 15:10:14 -0800 (PST) From: Jens Axboe To: stable@vger.kernel.org Cc: io-uring@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH 6.1.y 0/9] io_uring fixes for 6.1-stable Date: Sat, 5 Dec 2026 23:10:03 +0000 Message-ID: <20261205231012.3977993-1-axboe@kernel.dk> X-Mailer: git-send-email 2.55.0 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Greg, Here are 9 io_uring patches for 6.1-stable. Patches 1, 4, 5, 8 and 9 went to Linus in io_uring-7.4-20261127, merge commit 7cd8495c0f16 ("Merge tag 'io_uring-7.4-20261127' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux"). Patches 2, 3, 6 and 7 are older mainline commits, backported because the fixes are written on top of them: 2 (v6.19) and 3 (v7.4-rc1, Fixes: 2) for 4, which needs ctx->tctx_lock; 6 (v6.13) and 7 (v6.13, Fixes: 6) for 8, which needs the raw timeout_lock. The series applies on top of v6.1.193 plus queue-6.1 at stable-queue commit 16dfa5cc8e2f. It also applies to v6.1.193 alone. Patches 2, 3, 6, 7, 8 and 9 needed changes for 6.1. The [axboe: ...] note at the end of each says what was changed and why. The rest are the upstream changes as they are. Please take these together, in this order: 2-4; 6-8. Testing: the liburing test suite (liburing-2.15-76-ged312b3c) was run in KVM guests with PROVE_LOCKING and PROVE_RAW_LOCK_NESTING on two kernels: v6.1.193, and v6.1.193 plus these patches and the io_uring patches already in queue-6.1. The patched kernel fails exactly the tests that v6.1.193 fails (napi-test times out; cancel-fd-userdata, io-wq-unused-exit, poll, poll-mshot-wake, send-zerocopy and timestamp fail), all from the test environment. No WARNING, BUG, lockdep or KASAN report in dmesg on either kernel. io_uring/ builds without warnings on v6.1.193 plus queue-6.1 plus this series. CVE assessment, by the io_uring maintainer: Should get a CVE: 4/9 io_uring: free the ring after a grace period 5/9 io_uring/filetable: don't install O_PATH files 8/9 io_uring/cancel: always walk links under timeout_lock 9/9 io_uring/net: restore the cmsg buffer on recvmsg retry Should not get a CVE: 1/9 io_uring/net: don't copy msg_name on a recvmsg retry Writes past msg_name, in the caller's own user memory only. 2/9 io_uring/tctx: add separate lock for list of tctx's in ctx prep for 4/9 3/9 io_uring: free the task context after a grace period Fixes 2/9 of this series, no release has the bug. 6/9 io_uring: make ctx->timeout_lock a raw spinlock prep for 8/9 7/9 io_uring/timeout: flush timeouts outside of the timeout lock Fixes 6/9 of this series, no release has the bug. Chris Mason (6): io_uring/net: don't copy msg_name on a recvmsg retry io_uring: free the task context after a grace period io_uring: free the ring after a grace period io_uring/filetable: don't install O_PATH files io_uring/cancel: always walk links under timeout_lock io_uring/net: restore the cmsg buffer on recvmsg retry Jens Axboe (3): io_uring/tctx: add separate lock for list of tctx's in ctx io_uring: make ctx->timeout_lock a raw spinlock io_uring/timeout: flush timeouts outside of the timeout lock include/linux/io_uring_types.h | 15 +++++- io_uring/cancel.c | 3 ++ io_uring/filetable.c | 3 ++ io_uring/io_uring.c | 37 +++++++++------ io_uring/net.c | 12 +++++ io_uring/tctx.c | 13 ++++-- io_uring/timeout.c | 83 ++++++++++++++++++++-------------- 7 files changed, 112 insertions(+), 54 deletions(-) -- 2.55.0