From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84A86C47DD9 for ; Mon, 22 Jan 2024 17:39:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C0698D0007; Mon, 22 Jan 2024 12:39:20 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1494A8D0001; Mon, 22 Jan 2024 12:39:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0127F8D0007; Mon, 22 Jan 2024 12:39:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DE76A8D0001 for ; Mon, 22 Jan 2024 12:39:19 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 9ED28120248 for ; Mon, 22 Jan 2024 17:39:19 +0000 (UTC) X-FDA: 81707658438.09.D116110 Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by imf24.hostedemail.com (Postfix) with ESMTP id 04A0D180020 for ; Mon, 22 Jan 2024 17:39:17 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=jxdap8d0; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of edumazet@google.com designates 209.85.166.174 as permitted sender) smtp.mailfrom=edumazet@google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705945158; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=VFL/pJ8lBcoZD5EX7oUKXSpQaXjWBIZbPdd+OtvuQEs=; b=owuHGd8rZGJLAMoOtUleHOc79BLMLjDcz+kVBRfdmB1vdHShDA74EoLexeLsG9kDImhhlD uKbPBit6R95qpcwJEF/nrRULa/H09LUOZ+mDQyH1OYQ9x0R94DpYeHkRp8ggVN0G3aRfBu 8CbiUjqjMfrP8Btb/PNS/4tL9NoV9GY= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=jxdap8d0; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of edumazet@google.com designates 209.85.166.174 as permitted sender) smtp.mailfrom=edumazet@google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705945158; a=rsa-sha256; cv=none; b=fiNeyRBu7EK3GoCZADKLogNMAH361rhcFW+NjQuDWaFRdsTNUBjHDBvhC6T8qPk91+xZ+z zHIhzxA66aoehzH4KFn6kwPAfGbFAz51aMjn/OeHsycbUAbOdZiM5XTkRGjgv02x2BCTE0 57X/Fn604up8oGYKk2YINJDH559wICc= Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-3600b2c43a8so1575ab.0 for ; Mon, 22 Jan 2024 09:39:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705945157; x=1706549957; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=VFL/pJ8lBcoZD5EX7oUKXSpQaXjWBIZbPdd+OtvuQEs=; b=jxdap8d04iqADA6fWYZWKJmB/FRhvw9qeqLEGwZ1J/SlIu5h2gNKko5Vl77uRj5vpc x5ni0tqBVlJiptXP6WC86Qi8821D9zDz2nWAZdO2gLAQ0m5dSIYqeszVQIY93vsyuLyq F9A99hBIN9Xyzr8KAgnUc29wKpe6mU9YmiC4uoqEJ9CkBrCOv5KiPKHxvVKVbbZXonPG U1/oyJ218xhEOgXfVeCCedyRorcni9YjvNLzXUs1C60Wm9tmzPKyGn8o9cWatBZ0yOWv LTg7hOsAUakDmFzs8qfbmj14Ac3c5E5Hnur6b6z7j+FwLx2as+fA/Ej8hQU0OthnJXCI tDew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705945157; x=1706549957; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VFL/pJ8lBcoZD5EX7oUKXSpQaXjWBIZbPdd+OtvuQEs=; b=Akn86F54u+9S0upPbTbWdQHjO7+xDW7IyrNpkx5trsyP5TI3HjzMffDt7xfCzpdR5I ulUojWZ4YIo9W8v+m7jB4zqPD7xSE5DYFs666fSSYw6p3MaaENILZfTRdT9ObFaMW7oz mI4ci77/JDfwVagZl4QVg6GLGQE5Xw/Yk15Le2K2QoZal1ZyEHNY0uZlcwCAp4ZYRfEr uq0KyaCiSIXOhLZAxKp3kA92dHdW8X3d/sa0+qVyKYHQbnOYPAnOORhl6/We+bYpObrd gLdhL+V1sxy8PAOvltlloC+sRpKucLk0Lfbh8zeaJxOZdxfjXlwOPTCETeJd72Ozdqcv NX8Q== X-Gm-Message-State: AOJu0Yx0ZRpzq2I3AAmU/NvrUsjhZ/9wYYN6w5QGOUYPZK6h3EBsxjgE ZQB2YaJtgP585qSVreBv++pQ3NN/0LUiglDgv3dOEH5S8dcw X-Google-Smtp-Source: AGHT+IEEEj8QEKx7WALQ/y8chwZxkEBYc5Si3Sg0sBoZD48NB4UP8F+1j2y3WziM2jUCW63ZmvVnFrQq9Y40lYL4jZM= X-Received: by 2002:a05:6e02:1905:b0:35f:b09b:ccd2 with SMTP id w5-20020a056e02190500b0035fb09bccd2mr481453ilu.7.1705945156747; Mon, 22 Jan 2024 09:39:16 -0800 (PST) MIME-Version: 1.0 References: <20240119092024.193066-1-zhangpeng362@huawei.com> <5106a58e-04da-372a-b836-9d3d0bd2507b@huawei.com> In-Reply-To: From: Eric Dumazet Date: Mon, 22 Jan 2024 18:39:04 +0100 Message-ID: Subject: Re: SECURITY PROBLEM: Any user can crash the kernel with TCP ZEROCOPY To: Matthew Wilcox Cc: "zhangpeng (AS)" , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, akpm@linux-foundation.org, davem@davemloft.net, dsahern@kernel.org, kuba@kernel.org, pabeni@redhat.com, arjunroy@google.com, wangkefeng.wang@huawei.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 04A0D180020 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 5ho1zc1der9d5w3wgqcy6z7nqagdcros X-HE-Tag: 1705945157-221309 X-HE-Meta: U2FsdGVkX18ltPQTzI/xi6SsrR+JvmT6oKHCRVAwZoOtCKttGsipadrO3mi5laLw34VkfUKpG8iN0aVLHQlfLgaWEReSfAzZiENIcS4vXewILtcUlmkxyq7TVYP7zO0GG2FFQdcp28LIW3fe/nhf7aGvtEPnbe0isZ6E44Add7TcYs0Qc8jjSN4Z035cdi4s1zZvdNlUHOURKRZLitJnkXLsd3xsobjWyYmJirQqlzllVXkmW3FbALRSC3/Tcxpn+gimqyllQr8R9FVaR7mx2xTZmguzsB+4iMiOWLFe7t6QBdJSjl7Rp1X2oVjq4p9mnEBr4I6d15a/QU9VblWBhYcxBnpRz4anbOMDH/nyQMs5e6/JoyeNsJ/n9RtL6uQCphQeosgz8mfp5cHvc7rXyhW80TDDhalIAoqMK2j4z3SH82kMiY0oY/czy/JXiWFKamL++/oqB9NH2OoGxDmgm+JpsYcXjAEC9hUMUNOkBWgbtTL8mmVJtQIJOVR2OxPREZlyNs3XumiAY7HOgdyGWCgDvBw55IWE5r0/4ZQnCu2XgAumY6rzRwZXoWaKlMjZ1TvybgfYreB3Z0ERaA1B6xFmW8Q+h/ZSdE/2g1ynNJ5c/SOU7uYbjAb/HEtSXfFtmozt37warLAXAkFbjnXLbIlj4XqRKpk3IyfBOL3AdjP0EzV7SqZgA1GjmA2GH52qknVdKPoPIH5LnnXhQw7B0Jf19X1SJiBo2PZNabd3n9mH2HZw1do4acuJL3H427PZEHhDvt2IhOv4FFfNwCA3JrZ59yEQPFDmoJnbKAQl5FQ8Ie4gECM2blajl3XYkF8X2SrszN22Dg3pHyBtasRu93Y3nm988zO0lPmVbLuvTbBba5ioqrVlnwdFg5MvXoxq6v8KiTc50C6RFjhcKCQNkq9ewkkbgdmYT1XkfWEW/tuPJPDjybcQs3QRQKbPx3RFAXvQM3o6MaT3uk9R0z4 +FxFJ3Od lgJXg X-Bogosity: Ham, tests=bogofilter, spamicity=0.000433, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, Jan 22, 2024 at 6:12=E2=80=AFPM Matthew Wilcox wrote: > > On Mon, Jan 22, 2024 at 05:30:18PM +0100, Eric Dumazet wrote: > > On Mon, Jan 22, 2024 at 5:04=E2=80=AFPM Matthew Wilcox wrote: > > > I'm disappointed to have no reaction from netdev so far. Let's see i= f a > > > more exciting subject line evinces some interest. > > > > Hmm, perhaps some of us were enjoying their weekend ? > > I am all in favour of people taking time off! However the report came > in on Friday at 9am UTC so it had been more than a work day for anyone > anywhere in the world without response. > > > I don't really know what changed recently, all I know is that TCP zero > > copy is for real network traffic. > > > > Real trafic uses order-0 pages, 4K at a time. > > > > If can_map_frag() needs to add another safety check, let's add it. > > So it's your opinion that people don't actually use sendfile() from > a local file, and we can make this fail to zerocopy? Certainly we do not do that at Google. I am not sure if anybody else would have used this. That's good > because I had a slew of questions about what expectations we had around > cache coherency between pages mapped this way and write()/mmap() of > the original file. If we can just disallow this, we don't need to > have a discussion about it. > > > syzbot is usually quite good at bisections, was a bug origin found ? > > I have the impression that Huawei run syzkaller themselves without > syzbot. I suspect this bug has been there for a good long time. > Wonder why nobody's found it before; it doesn't seem complicated for a > fuzzer to stumble into. I is strange syzbot (The Google fuzzer) have not found this yet, I suspect it might be caused by a recent change somewhere ? A repro would definitely help, I could start a bisection.