Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228127/?format=api
{ "id": 2228127, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228127/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/patch/20260425125426.3855807-10-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": "<20260425125426.3855807-10-dhowells@redhat.com>", "date": "2026-04-25T12:54:13", "name": "[v3,09/19] netfs: Fix early put of sink folio in netfs_read_gaps()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ad68f0343b90b0c13fcf67c157fe845ccf1ce4d4", "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/20260425125426.3855807-10-dhowells@redhat.com/mbox/", "series": [ { "id": 501437, "url": "http://patchwork.ozlabs.org/api/1.1/series/501437/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-cifs-client/list/?series=501437", "date": "2026-04-25T12:54:04", "name": "netfs: Miscellaneous fixes", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/501437/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228127/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228127/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-cifs+bounces-11118-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=SxQrnXAX;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-cifs+bounces-11118-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=\"SxQrnXAX\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=170.10.129.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 tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4g2qf42lVPz1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 22:59:08 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id C6BD3305D759\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 12:55:56 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 376A5396B9D;\n\tSat, 25 Apr 2026 12:55:26 +0000 (UTC)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.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 BC964397E9D\n\tfor <linux-cifs@vger.kernel.org>; Sat, 25 Apr 2026 12:55:24 +0000 (UTC)", "from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-439-LwnIGW8KOa2hin0ZIm-gyA-1; Sat,\n 25 Apr 2026 08:55:20 -0400", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id A6029195609E;\n\tSat, 25 Apr 2026 12:55:18 +0000 (UTC)", "from warthog.procyon.org.com (unknown [10.44.48.17])\n\tby mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 6AAAF1800370;\n\tSat, 25 Apr 2026 12:55:15 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777121726; cv=none;\n b=hujw0WbSPtsl/i+lcYk1vGT7NmltvoEF+8AkZAkDicrMzzFHg+IOIc/WXa1gxc5omz1ILswu9aEvQeagTQTX7tr+GdB9ighJXINjY4Q22UyTL7KJcMY28NG2w37PoZtg6pPYDpWX97MCf/E3LHxgAq1RwvQderVtIk0k4ZXhYWk=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777121726; c=relaxed/simple;\n\tbh=xQEQWkznnzqC6GtN7kZr/9o0Welio3Hidy1ODtgixx4=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=CXpvWyM8BtX/Kzs7nrmPUmFBqwr859uC6WHW23SbcnDM739L6xquOYg62rGS8ZSVbSAUI2N8TOWMggZw8krqsf+wyzLUNa1bnm7bXSQNOHppnZmBBx6KXFZWJZzswIPQlOD+tKhOJvC9tiZ3aaZ/T0rHoZ37rw8wmvBz68BQ8CM=", "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=SxQrnXAX; arc=none smtp.client-ip=170.10.129.124", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1777121724;\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=+yOnhaCE3U6y9AE7S+oRzPZ8r+xor1tPUOJ3YHB5Ogk=;\n\tb=SxQrnXAXMwh9kLdIx8OLq8ccj0oPLj4lBWiObF/MbevhhwLCjje7iSEU9Ta4OoRKrEQsBL\n\t6qivb4U92ujmzbiP/puRfQjG3eU4Q4LAoM1/veF+SYPDf30kJ+EyQM/cjETIeCn4+1+Egc\n\tgTtkwbVv3SjYUr3jpVn+egjt6bxN+E4=", "X-MC-Unique": "LwnIGW8KOa2hin0ZIm-gyA-1", "X-Mimecast-MFC-AGG-ID": "LwnIGW8KOa2hin0ZIm-gyA_1777121718", "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 v3 09/19] netfs: Fix early put of sink folio in\n netfs_read_gaps()", "Date": "Sat, 25 Apr 2026 13:54:13 +0100", "Message-ID": "<20260425125426.3855807-10-dhowells@redhat.com>", "In-Reply-To": "<20260425125426.3855807-1-dhowells@redhat.com>", "References": "<20260425125426.3855807-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.4.1 on 10.30.177.93" }, "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>\nReviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>\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 e87a55bda8c5..3fe129a9b1c3 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\tif (group)\n@@ -473,6 +470,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": [ "v3", "09/19" ] }