Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2225000/?format=api
{ "id": 2225000, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2225000/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260420083705.1009074-2-dhowells@redhat.com/", "project": { "id": 12, "url": "http://patchwork.ozlabs.org/api/1.1/projects/12/?format=api", "name": "Linux CIFS Client", "link_name": "linux-cifs-client", "list_id": "linux-cifs.vger.kernel.org", "list_email": "linux-cifs@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260420083705.1009074-2-dhowells@redhat.com>", "date": "2026-04-20T08:36:52", "name": "[01/11] netfs: Fix early put of sink folio in netfs_read_gaps()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "02b4ca22d894b95b7d7d73fc5db8e868bda1aaae", "submitter": { "id": 59, "url": "http://patchwork.ozlabs.org/api/1.1/people/59/?format=api", "name": "David Howells", "email": "dhowells@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260420083705.1009074-2-dhowells@redhat.com/mbox/", "series": [ { "id": 500568, "url": "http://patchwork.ozlabs.org/api/1.1/series/500568/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=500568", "date": "2026-04-20T08:36:52", "name": "netfs: Further miscellaneous fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500568/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2225000/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2225000/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-cifs+bounces-10924-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-cifs@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=LAAfxSn/;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-cifs+bounces-10924-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=\"LAAfxSn/\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.133.124", "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=redhat.com" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzf5x183Qz1yD4\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 18:38:45 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 41F223015327\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 08:37:38 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id BE1523890FC;\n\tMon, 20 Apr 2026 08:37:27 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 528D4303A0A\n\tfor <linux-cifs@vger.kernel.org>; Mon, 20 Apr 2026 08:37:26 +0000 (UTC)", "from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-332-tjVoit6wNru8srkOeHIZeQ-1; Mon,\n 20 Apr 2026 04:37:21 -0400", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n\t(No client certificate requested)\n\tby mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 83B9018005A8;\n\tMon, 20 Apr 2026 08:37:19 +0000 (UTC)", "from warthog.procyon.org.com (unknown [10.44.48.17])\n\tby mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 247B3195608E;\n\tMon, 20 Apr 2026 08:37:14 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776674247; cv=none;\n b=urFaLrbbbeAtLj3Kjev6/dnpQ4kZj8Dh0ozxN/b/957MLuX5WtbaVlsD+CY0+rZRL0hnHn5/OYPy61XpqmLWtnWcLYbtU0LZRRkW3vsf/ZSkeDF6784EDv3zMHaSZIXqSLVXEGNZ6zkeOV0tGj9H8xe9VEGzS5+ReSMMHL0+7vI=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776674247; c=relaxed/simple;\n\tbh=JE6CsI55nIe/za2bQ2wM//e11Vro+GT7jie6/v4Wuw4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=u7VaxQ359ZjfN3S8KNCnuIe3Gx9qT2Iov0EvmGVIcS1wtKMbWbjK2XCRwFgRF7d+JQW8s7TpgDTD5RwJg6icyXAXPE1xYGnz2EXD9vvigm+bqhjq+CGWoez1bTQ64Wn3kVofXgmVR9AifU7U7skB3OxAY4eGD/JqN6Hz5xpNjPU=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=redhat.com;\n spf=pass smtp.mailfrom=redhat.com;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.b=LAAfxSn/; arc=none smtp.client-ip=170.10.133.124", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1776674245;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=ksxJg5s1e4rqCiU0anjwW0Drg+bXTRaHFQWcy6sTuKQ=;\n\tb=LAAfxSn/3rU9Ivd58Hr6n1neexlCNwrE6inWPwdIFr1pHxnSRlNuuWj0eTLk96qosLeKDi\n\tzdCTuLvLa0QLqY8FJKWO8BAIQz3Dgoyckg4BksmXbIN9VXJITPFLO7nDEYij+xD4j7LC8i\n\tWIWg9CVy8q3gtTtDM3d6MIeEd62hNIg=", "X-MC-Unique": "tjVoit6wNru8srkOeHIZeQ-1", "X-Mimecast-MFC-AGG-ID": "tjVoit6wNru8srkOeHIZeQ_1776674239", "From": "David Howells <dhowells@redhat.com>", "To": "Christian Brauner <christian@brauner.io>", "Cc": "David Howells <dhowells@redhat.com>,\n\tPaulo Alcantara <pc@manguebit.org>,\n\tnetfs@lists.linux.dev,\n\tlinux-afs@lists.infradead.org,\n\tlinux-cifs@vger.kernel.org,\n\tceph-devel@vger.kernel.org,\n\tlinux-fsdevel@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tSteve French <sfrench@samba.org>,\n\tMatthew Wilcox <willy@infradead.org>", "Subject": "[PATCH 01/11] netfs: Fix early put of sink folio in netfs_read_gaps()", "Date": "Mon, 20 Apr 2026 09:36:52 +0100", "Message-ID": "<20260420083705.1009074-2-dhowells@redhat.com>", "In-Reply-To": "<20260420083705.1009074-1-dhowells@redhat.com>", "References": "<20260420083705.1009074-1-dhowells@redhat.com>", "Precedence": "bulk", "X-Mailing-List": "linux-cifs@vger.kernel.org", "List-Id": "<linux-cifs.vger.kernel.org>", "List-Subscribe": "<mailto:linux-cifs+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-cifs+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17" }, "content": "Fix netfs_read_gaps() to release the sink page it uses after waiting for\nthe request to complete. The way the sink page is used is that an\nITER_BVEC-class iterator is created that has the gaps from the target folio\nat either end, but has the sink page tiled over the middle so that a single\nread op can fill in both gaps.\n\nThe bug was found by KASAN detecting a UAF on the generic/075 xfstest in\nthe cifsd kernel thread that handles reception of data from the TCP socket:\n\n BUG: KASAN: use-after-free in _copy_to_iter+0x48a/0xa20\n Write of size 885 at addr ffff888107f92000 by task cifsd/1285\n CPU: 2 UID: 0 PID: 1285 Comm: cifsd Not tainted 7.0.0 #6 PREEMPT(lazy)\n Call Trace:\n dump_stack_lvl+0x5d/0x80\n print_report+0x17f/0x4f1\n kasan_report+0x100/0x1e0\n kasan_check_range+0x10f/0x1e0\n __asan_memcpy+0x3c/0x60\n _copy_to_iter+0x48a/0xa20\n __skb_datagram_iter+0x2c9/0x430\n skb_copy_datagram_iter+0x6e/0x160\n tcp_recvmsg_locked+0xce0/0x1130\n tcp_recvmsg+0xeb/0x300\n inet_recvmsg+0xcf/0x3a0\n sock_recvmsg+0xea/0x100\n cifs_readv_from_socket+0x3a6/0x4d0 [cifs]\n cifs_read_iter_from_socket+0xdd/0x130 [cifs]\n cifs_readv_receive+0xaad/0xb10 [cifs]\n cifs_demultiplex_thread+0x1148/0x1740 [cifs]\n kthread+0x1cf/0x210\n\nFixes: ee4cdf7ba857 (\"netfs: Speed up buffered reading\")\nReported-by: Steve French <sfrench@samba.org>\nSigned-off-by: David Howells <dhowells@redhat.com>\ncc: Paulo Alcantara <pc@manguebit.org>\ncc: Matthew Wilcox <willy@infradead.org>\ncc: netfs@lists.linux.dev\ncc: linux-fsdevel@vger.kernel.org\n---\n fs/netfs/buffered_read.c | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)", "diff": "diff --git a/fs/netfs/buffered_read.c b/fs/netfs/buffered_read.c\nindex c23173a061e8..dc50690fdd44 100644\n--- a/fs/netfs/buffered_read.c\n+++ b/fs/netfs/buffered_read.c\n@@ -459,9 +459,6 @@ static int netfs_read_gaps(struct file *file, struct folio *folio)\n \n \tnetfs_read_to_pagecache(rreq, NULL);\n \n-\tif (sink)\n-\t\tfolio_put(sink);\n-\n \tret = netfs_wait_for_read(rreq);\n \tif (ret >= 0) {\n \t\tfolio_detach_private(folio);\n@@ -471,6 +468,9 @@ static int netfs_read_gaps(struct file *file, struct folio *folio)\n \t\tflush_dcache_folio(folio);\n \t\tfolio_mark_uptodate(folio);\n \t}\n+\n+\tif (sink)\n+\t\tfolio_put(sink);\n \tfolio_unlock(folio);\n \tnetfs_put_request(rreq, netfs_rreq_trace_put_return);\n \treturn ret < 0 ? ret : 0;\n", "prefixes": [ "01/11" ] }