Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp358884lqo; Wed, 8 May 2024 01:48:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6QJ7Cwy2PVKtfQO39Ji9scdxH0VARvZ8GjRQj9a8W4Jhy6uJA6bLynHb976Si7qFKeryRb8Ie02ujgHHbQBUXx953aLypVe+YfVVIoQ== X-Google-Smtp-Source: AGHT+IHJa0njj7KwTFrZZ4SmZMXtNvUa3r6icHzs/ksaM65dXqvimGVs/y3DwkWtgRxS8McOMSdU X-Received: by 2002:a05:6a21:3949:b0:1af:cdc5:dfbe with SMTP id adf61e73a8af0-1afcdc5e115mr437844637.15.1715158082449; Wed, 08 May 2024 01:48:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715158082; cv=pass; d=google.com; s=arc-20160816; b=Mh4B1CfyFT1otApuWcpb/WCi5DhbsU8i8b4aFf78PyWHB31Zes4UEqvMJ5I4NROjgX V9rLnKeyW/XBEeXZ1t2Kk8CaeNzgsejUWMnZHpHV3TAoZOEJ4JjiE1QIPycefArygmc6 7lhBswmrhUGnowrHhr6VBmITX7qlwxdPNjM/Dqq8ePtvC7uZSN8xWziJgY11KJv0rULE EV+HBHlol0C5Fb3c0QzCPl+PcurIZKSNaUPLnVsCFHzDbkyBVAgLzp0Ay1+PwNomZVDj vwSaQPOUVDQDEdCe0jmN9VMeHAPb9CP+RDR70ciy6Cz+I80h8UpMUj349zqcKw9ROi/e ga3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=+k4fFRK3ntPuUO9itZTxjmTMtQDmF173NLmL5XtqYL4=; fh=91pQJ8pF3izCrHdQRYMwt3W6nBwXp+iFeWSu9nvfykY=; b=RcmljhGWLJT+2ncrZjON8oUXuw4UqlEzQq3S7D8ZE+kPe69VP/DjGef/YSqxm3B41g 00gv9MACalRf49zSCd8XiZ/CYHE3Rqp0iANwpYl6fQqwgc9k+UlKyqP9qy3OWZdjUWOw TfddulLzs9VR7xePoquKNsB9HWwGyaNLjsdNBAlRt2sLPT7SEbh71sUknpYlOqeKnhEa qX0TPJMGKC3qEj7TgS2oBHj0TN9qJ176Gt3ydSXC1I85yVbFdyUP/Icn/a98q92R5HxQ 1rO99/sBmdTxZ8t163zVy09EK8nz7fERps6fnldLJ0L96kWFX/TPMYIY3C4Uz5ekkLTw WB2g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-172938-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n2-20020a63e042000000b005f0a5127bd5si11415491pgj.113.2024.05.08.01.48.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 01:48:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172938-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=aculab.com dmarc=pass fromdomain=aculab.com); spf=pass (google.com: domain of linux-kernel+bounces-172938-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172938-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4ECAE280DA8 for ; Wed, 8 May 2024 08:48:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E77C53813; Wed, 8 May 2024 08:47:53 +0000 (UTC) Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.86.151]) (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 5076F433A6 for ; Wed, 8 May 2024 08:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.58.86.151 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715158073; cv=none; b=obE34T7evC75Cvs1g3NSwBy4f/jd2P5El3jJ87i//blaK0Iz0ZYVecwN1rczKT0AymC1M+tXxcJ7TYeJHjSZOzxndmnn2lYmzV+DAuGyVAgfz2IxV1uxo9Hq4d6zTLYHcWaPgO6B56tr+zOAJriMX7TD7TU3NbgTmR7SYRJpbuY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715158073; c=relaxed/simple; bh=+k4fFRK3ntPuUO9itZTxjmTMtQDmF173NLmL5XtqYL4=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: MIME-Version:Content-Type; b=Vd1NihyqpsRG03vJ4fJPF02u7BY553io6Sfcl4lHly/tPSp+SVQ0/znVBIdmJPkXjI6TaqWw80I+76xNObGOA4hP3HyVLmtef06wfq4lkB30ZmWQuvRoWDgqpz94trbdfKAP5he1+zAYsA+O43rdP9mMcGalGI1UU71/z+nX4Ag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM; spf=pass smtp.mailfrom=aculab.com; arc=none smtp.client-ip=185.58.86.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ACULAB.COM Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aculab.com Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-29-05uJX4YSMKKtp074SKxZbg-1; Wed, 08 May 2024 09:47:43 +0100 X-MC-Unique: 05uJX4YSMKKtp074SKxZbg-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Wed, 8 May 2024 09:47:12 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Wed, 8 May 2024 09:47:12 +0100 From: David Laight To: 'Linus Torvalds' , Stefan Metzmacher CC: Al Viro , Kees Cook , "Jens Axboe" , Bui Quang Minh , "Christian Brauner" , syzbot , "io-uring@vger.kernel.org" , "jack@suse.cz" , "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "syzkaller-bugs@googlegroups.com" , Sumit Semwal , =?utf-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= , "linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linaro-mm-sig@lists.linaro.org" , "Laura Abbott" Subject: RE: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove) Thread-Topic: get_file() unsafe under epoll (was Re: [syzbot] [fs?] [io-uring?] general protection fault in __ep_remove) Thread-Index: AQHan+G0osQPVpGyjEu2UGFetalDzbGNBmXA Date: Wed, 8 May 2024 08:47:12 +0000 Message-ID: References: <0000000000002d631f0615918f1e@google.com> <7c41cf3c-2a71-4dbb-8f34-0337890906fc@gmail.com> <202405031110.6F47982593@keescook> <64b51cc5-9f5b-4160-83f2-6d62175418a2@kernel.dk> <202405031207.9D62DA4973@keescook> <202405031237.B6B8379@keescook> <202405031325.B8979870B@keescook> <20240503211109.GX2118490@ZenIV> <501ead34-d79f-442e-9b9a-ecd694b3015c@samba.org> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 RnJvbTogTGludXMgVG9ydmFsZHMNCj4gU2VudDogMDYgTWF5IDIwMjQgMTk6MTgNCi4uLg0KPiBX aGljaCBpcyB3aHkgSSBhcHBsaWVkIHRoZSBtaW5pbWFsIHBhdGNoIGZvciBqdXN0ICJyZWZjb3Vu dCBvdmVyDQo+IHZmc19wb2xsKCkiLCBhbmQgYW0ganVzdCBtZW50aW9uaW5nIG15IHN1Z2dlc3Rp b24gaW4gdGhlIGhvcGUgdGhhdA0KPiBzb21lIGVhZ2VyIGJlYXZlciB3b3VsZCBsaWtlIHRvIHNl ZSBob3cgcGFpbmZ1bCBpdCB3b3VsZCBkbyB0byBtYWtlDQo+IHRoZSBiaWdnZXIgc3VyZ2VyeS4u Lg0KDQpJIHdvbmRlciBpZiBJIGNhbiB3b3JrIG91dCBob3cgaXQgKGRvZXNuJ3QpIGN1cnJlbnRs eSB3b3JrLi4uDQoNCglEYXZpZA0KDQotDQpSZWdpc3RlcmVkIEFkZHJlc3MgTGFrZXNpZGUsIEJy YW1sZXkgUm9hZCwgTW91bnQgRmFybSwgTWlsdG9uIEtleW5lcywgTUsxIDFQVCwgVUsNClJlZ2lz dHJhdGlvbiBObzogMTM5NzM4NiAoV2FsZXMpDQo=