Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3356215imw; Mon, 11 Jul 2022 07:10:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sk+7g0prBAvkY63SozJj63u2ZquwafJ7Bs/H7xYdzAv36KmMZglX4wDJBcXeA9OEFQM2FZ X-Received: by 2002:a17:906:4786:b0:722:e5ac:7d96 with SMTP id cw6-20020a170906478600b00722e5ac7d96mr19424331ejc.172.1657548621140; Mon, 11 Jul 2022 07:10:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657548621; cv=none; d=google.com; s=arc-20160816; b=CDgxMTSu1RDtF0WV8aCcFeRB4ZvS6ck4V8kW4vNOWe75dyj6ddmiLNtriOGd7aQLsE 4I3eNjRhhz0b5Dr6OiN0Z0ppHSykZ1ImiTIJAOzOo1sKz9h0FNMIlZ/xbKEn8zypkeF9 ji4JBRTRWr14+u6tPoZJ8NqkQPjRfI2gd+LOYBfMgwFzx22nrccOfsvF3U/IcBxaLZVw D4lbCQGSTQvxwQjqbO2KZ510pIMPEM1m94a13kj1gncGGq6OWyCQX594ZxGJRZSbyM12 I2IRwlhqZYiGkp9dG5Wq9wERt2gMm2pRLaoNvuM+m02ZivaXzvK1f/DckRN4XtZR+LOw Rwhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=lWiFVldYFpc43AAKGHak4SIYlIz8MXzcKwTkW7YdQfA=; b=dtgv29CTTEZkgc+NS/5bPE44+FOKxz480kCQZGj1ueS+VIt5HolSz+5shW2QbcunyU CI+70dYWoFxcIoGsZHX9F+vFLFgyGjwAgBmtQTD8jRf1fpubFAp+hBdNt89G5NIKseza 6rU+9sn9aKOEqJG+s8it7ChBYRDhr8YjdhUxYukHejHwo10ya9+wfvLMNtSlS1u1fwma VtmS6jWl3AqNM3Pb1Pcrtm+YPcveks+y0XlcRbTwWa0CWMUXY/crKqZrvNy+il2gz7d8 zgePB4ZK2KnTDnFpZJgvWxkbNMh6d+H7jKmOOGqBjh7lnLSkwR4rcK8UKP9Nm640bUpu xCZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=AP9KrQr3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc12-20020a170906dfec00b0070870e20c98si9781238ejc.123.2022.07.11.07.09.55; Mon, 11 Jul 2022 07:10:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=AP9KrQr3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbiGKN7b (ORCPT + 99 others); Mon, 11 Jul 2022 09:59:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiGKN7a (ORCPT ); Mon, 11 Jul 2022 09:59:30 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEE6E25285 for ; Mon, 11 Jul 2022 06:59:27 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id k30so6349925edk.8 for ; Mon, 11 Jul 2022 06:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lWiFVldYFpc43AAKGHak4SIYlIz8MXzcKwTkW7YdQfA=; b=AP9KrQr3hrMTHU6BqHP+ayGIjC/0dB3htDH8429174+d/0ySgzU87bdU/3eQWWq1gi CcAPj8o7Xa7nPpeAx0ThLXyahv+DBWMparJjcj5+DDA1XkQpBeq74rziOO/uFdgJbcjA 45zm6fR8ENYetI/dvZYzgoKlwtf+BVvi+oPoE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lWiFVldYFpc43AAKGHak4SIYlIz8MXzcKwTkW7YdQfA=; b=6XqNcMArjFmu4ZNZBx2+Oe471ISYR9TlIIMa1kPCBWqOLZYtr2bl4X+XIH5XZ3gptD bS3mdC86N5d9BAfCnB+eeKTZD4fE4UiE4JroVxbtDhjltkxSazhXpBoOUK87x9EXsvHl yvM/bLNLBe1ec2B+8Y3FvtFfF5kO9ua6i6hF220slJ7QI07ThjHugjt9Xi5WkVQ0ce8L ZqFyZ/Lvht+zPUMgSJjhgRgqQHohJ3Q0EJM6DU2R1ARvSuB/+7y/NPDlaQWdr66W7Mdz FVgudL9w9TK7v2pf9+qS1F2JlJlhBUO6QcaUzXputQmhLbT9DAqCvD8RTEUgJfIRxb+6 JfpQ== X-Gm-Message-State: AJIora9sPadmP8w31JjDzwdfZK4FY/YWQTLhNRLfemQKhCfQhcCTarq3 PPkIZ9TSXsexbnAdoKUYZEfMJ9OuDtLAIFO36Irp9m6rvpc= X-Received: by 2002:a05:6402:5205:b0:43a:b520:c7de with SMTP id s5-20020a056402520500b0043ab520c7demr20935862edd.22.1657547966498; Mon, 11 Jul 2022 06:59:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Miklos Szeredi Date: Mon, 11 Jul 2022 15:59:15 +0200 Message-ID: Subject: Re: strange interaction between fuse + pidns To: Tycho Andersen Cc: Eric Biederman , Christian Brauner , fuse-devel , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: multipart/mixed; boundary="000000000000be1cf105e387f5bd" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --000000000000be1cf105e387f5bd Content-Type: text/plain; charset="UTF-8" On Mon, 11 Jul 2022 at 12:35, Miklos Szeredi wrote: > > Can you try the attached untested patch? Updated patch to avoid use after free on req->args. Still mostly untested. Thanks, Miklos --000000000000be1cf105e387f5bd Content-Type: text/x-patch; charset="US-ASCII"; name="fuse-allow-flush-to-be-killed-v2.patch" Content-Disposition: attachment; filename="fuse-allow-flush-to-be-killed-v2.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_l5gt93xl0 LS0tCiBmcy9mdXNlL2Rldi5jICAgIHwgICAyMyArKysrKysrKysrKysrKysrKy0tLS0tLQogZnMv ZnVzZS9maWxlLmMgICB8ICAgIDEgKwogZnMvZnVzZS9mdXNlX2kuaCB8ICAgIDMgKysrCiAzIGZp bGVzIGNoYW5nZWQsIDIxIGluc2VydGlvbnMoKyksIDYgZGVsZXRpb25zKC0pCgotLS0gYS9mcy9m dXNlL2Rldi5jCisrKyBiL2ZzL2Z1c2UvZGV2LmMKQEAgLTM5Nyw2ICszOTcsMTIgQEAgc3RhdGlj IHZvaWQgcmVxdWVzdF93YWl0X2Fuc3dlcihzdHJ1Y3QgZgogCQkJcmVxLT5vdXQuaC5lcnJvciA9 IC1FSU5UUjsKIAkJCXJldHVybjsKIAkJfQorCQlpZiAocmVxLT5hcmdzLT5raWxsYWJsZSkgew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