Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3367852imm; Sun, 29 Jul 2018 17:19:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcg43J2iSq7JUOqDlAaRmyKKvvUrn+ZPiWkI+BdwVjN2TdJtBLr7OpulsRwtE9hmojhQAAa X-Received: by 2002:a63:90c8:: with SMTP id a191-v6mr14333631pge.173.1532909957376; Sun, 29 Jul 2018 17:19:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532909957; cv=none; d=google.com; s=arc-20160816; b=gHp2GWhGz32aGNIWOvReiEzgjkLLnbZclxsyEtjAmlBpNeaDg8FSzrbzsQBXz4AfU+ GAe1CMu1csusAKsAjLil2xOM+eBXewUUSHXRXn1ORef9mlLNsI0jSuDjIfZigBiGNbzi owd+jCqREUxMJm4g+VKc4CSRO8P69GjHcASRwtVeg7i0Oj0jRfUzoZ5NPv80WRoIO4hS DLqhGHr+AAxRnT1dkluyF/p5MsTmS4IUYTZxGLLEJuXwcSuy35aGKDB1H38m3okk8q+l 0kQ8p8Y8x5FbtJj416VYbbw0fhaWKUDPblUqnFmmOWEhXXOuYXrYJEStA5leZCluVhkR 6yPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=/1oJrbKXwfbTkgQ2QQs2uUmngh4071DbOu2czfJfF50=; b=u44Vh+7eIIJ+n8Vy7tq1aCs3y2uApSSmlK/67xYXvCqDvTg6a5v0lyjs4RKGdth6IO zuyp9toPpcF32qQaFc8vqFTdWyi/ppyz6tVyFaHyH7X6dLVULpIBhb9ggXFcyl7eNibr j7PI6qRrtq8xukVUJpgCH0NKtZKdBPGP9CTb3oFoR/6SRVmgJ6ulFwd4XcMGUFWnxnS9 tZyqKs2yYE79ViZJMrqzs6hJgS7xMmfTacBtLId19k0lud7Mo9DEJPw0ARv7vrmVdXX6 fDsNj3/OtvDlJjX+II9aZmKsKsnWIsVmH73nB7hV5WSscRXoqBs+soIxtVD6Wd92uM3k XmGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w188-v6si9970694pfw.307.2018.07.29.17.19.03; Sun, 29 Jul 2018 17:19:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728708AbeG3Buj (ORCPT + 99 others); Sun, 29 Jul 2018 21:50:39 -0400 Received: from nautica.notk.org ([91.121.71.147]:44396 "EHLO nautica.notk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728118AbeG3Bui (ORCPT ); Sun, 29 Jul 2018 21:50:38 -0400 Received: by nautica.notk.org (Postfix, from userid 1001) id 7FA92C009; Mon, 30 Jul 2018 02:18:15 +0200 (CEST) Date: Mon, 30 Jul 2018 02:18:00 +0200 From: Dominique Martinet To: Tomas Bortoli Cc: v9fs-developer@lists.sourceforge.net, syzkaller@googlegroups.com, davem@davemloft.net, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [V9fs-developer] [PATCH] 9p: fix Use-After-Free in p9_write_work() Message-ID: <20180730001800.GA5960@nautica> References: <20180729130248.29612-1-tomasbortoli@gmail.com> <20180729233336.GB28684@nautica> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180729233336.GB28684@nautica> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dominique Martinet wrote on Mon, Jul 30, 2018: > Basically, a more global view of the problem is a race between > p9_tag_lookup returning a p9_req_t and another thread freeing it. (just correcting myself here, p9_tag_lookup won't be enough for the write side, but similarily you'd just need to increment the refcount when you schedule work with it and decrement when the worker is done) -- Dominique