Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp104607iof; Sun, 5 Jun 2022 22:30:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBk/TjyVDe9Jatym2MBEqu48XYNOgiD570qvxq0+061VUHD2CIJP2r/PiF7QeVNW1Nvvg1 X-Received: by 2002:a17:90a:5c84:b0:1dc:9b42:f2cf with SMTP id r4-20020a17090a5c8400b001dc9b42f2cfmr59367120pji.123.1654493454452; Sun, 05 Jun 2022 22:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654493454; cv=none; d=google.com; s=arc-20160816; b=DXP4QQxnYQ2EJ+rSzH0Tx2t62iUBtkGMMkc+vER5TyyGbUO80CwNlRQIdOJMDYzFSw z0NkGL5h/TZ4gInisvtNjFkftij0RLJ5Lui2n1PIBngcACeUbW73ADNOqbuHJelIGryw qycw9NdlwlXPdxVJ1n9e8SdaOwCROYN+AWfiXNq+5Lc0K+W3jtmSunMZVFIdjr3PHsCK 1CtEGeWociHbWVWA4ClpI8sS0S5Kw17Uha+JFsb6CQUNJiknm3ry/9x6G2aE9ln8zm8D /6LSt/HpoitTA/uQXx8PdQDK3HSvP4NZvhxj/3qyZ0ryWclNhdT6Uog5Q9jGKnO1CmF2 u4Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Sk/LpREl6lCpYUK3sh4dhIYv+NwXzY+EQFNtou9uNgg=; b=Eclq6TaE3fswC+n7iqyaz6JmO/SSGoD1rY5TQsomKNfmTbvvBg4yp9m0Bi3G9JO8gu nCiwDqkuYdh9w18XBFoTweTW5Nh2LtWmbfvIfHL90b+QFswP9AeOsi/08QYBjFcIiRpx m2brnCML47omU4pxV47NL/meNi1v/e5xyvyz3HooxxnI+woezIg5/7Qxkesyg4jREZ7J 9y9aWxbAqeU2Uc36nuUAMD2oSh5iCb2TeJ5Myok1a2eC3PcEj1AdbVkFV3XOXGWf9DKH K+XsEjcQF7ZQCvJEoR7+S1o/NMCg9Uuk17UAE5Z/Xqsqh7wyJXWTlh1PAIoVnJpojiCB YaJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WU//QHTd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 5-20020a630f45000000b003fd9e43f9bfsi5102152pgp.393.2022.06.05.22.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:30:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="WU//QHTd"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DAC58202D0B; Sun, 5 Jun 2022 21:31:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236005AbiFBOiF (ORCPT + 99 others); Thu, 2 Jun 2022 10:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236002AbiFBOh5 (ORCPT ); Thu, 2 Jun 2022 10:37:57 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B0AC30F77 for ; Thu, 2 Jun 2022 07:37:56 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id u4so1950834pgk.11 for ; Thu, 02 Jun 2022 07:37:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Sk/LpREl6lCpYUK3sh4dhIYv+NwXzY+EQFNtou9uNgg=; b=WU//QHTddMEmbobKV3WmcaFVCVlqESjL4yadeBcxJG2Ehcb0sSYTsZ2ImwxNeLk/vm MlQdDacFExr4Y4YHDdLlFOOS1UjdqOIrJFDkP/uhF4qxxtDHANzfd/1htrEsoDczNBt9 pbsUknttci1Qm1XuPwq7iten0RYvQ3EgZAPklHaWN5NWPnYBt1zpZrUUMCnLDduM4fQZ Jf+eiPYLSvXYm/5oFexTJemCClME2J4GAt69BjH4gRvnso9TSvpmG5pJdtSKY1ajWgPO 24aLoQGMyZ221R2i8b0wtiAv/IeG1ozi7UfMDcsGOIeD7POBBFykhNSQ7/+AHwBJdikp NLMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Sk/LpREl6lCpYUK3sh4dhIYv+NwXzY+EQFNtou9uNgg=; b=jVV0mxBf7jPFdk1DcptK7KGo6jh7lH+vrcZaxmrdybSLE1DzmkyCjaUlZ6p49HnlKy 9ew1rO5Mdy1j5mSZvaGkBJUic9DtJ/PcaONf2cPdLGsgLr7lBeqUyruiiegZquz9QEzA +p8JAnig9MC/xCPFBUUfFTAgCzrJhcoOqCZbihlcQsJmFDm5YdM65gcXjnhiWYSZeLe4 6fv97wVGSFRUP2GinnikJy85Nk8mMG5T0h3lD851JaX7RYQVyXMsnbKWl6JawjEpmygJ 1KlxYXFxY3dXPxu9YT5utqOO9nwpEgiyir0fSv3iBWV5vKd8HQWWyVQU8e0hoUZ3d10q JVig== X-Gm-Message-State: AOAM532R77pngTaguTt2fvK0PxXp1HO54V7sMu+Cfw0iAD6/OIO0yI1G mc6wfHqZqO9ZB5YLHSAdTDg/nQ== X-Received: by 2002:a63:f955:0:b0:3fc:cf92:cd26 with SMTP id q21-20020a63f955000000b003fccf92cd26mr4494997pgk.137.1654180675640; Thu, 02 Jun 2022 07:37:55 -0700 (PDT) Received: from [192.168.254.36] ([50.39.160.154]) by smtp.gmail.com with ESMTPSA id z14-20020a17090a170e00b001df239bab14sm3440275pjd.46.2022.06.02.07.37.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Jun 2022 07:37:54 -0700 (PDT) Message-ID: <41265f4d-45b4-a3a6-e0c0-5460d2a06377@linaro.org> Date: Thu, 2 Jun 2022 07:37:53 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v4] bpf: Fix KASAN use-after-free Read in compute_effective_progs Content-Language: en-US To: Andrii Nakryiko Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Networking , bpf , linux- stable , open list , syzbot+f264bffdfbd5614f3bb2@syzkaller.appspotmail.com References: <20220517180420.87954-1-tadeusz.struk@linaro.org> <7949d722-86e8-8122-e607-4b09944b76ae@linaro.org> From: Tadeusz Struk In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Andrii, On 5/23/22 15:47, Andrii Nakryiko wrote: >> Hi Andrii, >> Do you have any more feedback? Does it look better to you now? > Hi, this is on my TODO list, but I need a bit more focused time to > think all this through and I haven't managed to get it in last week. > I'm worried about the percpu_ref_is_zero(&desc->bpf.refcnt) portion > and whether it can cause some skew in the calculated array index, I > need to look at this a bit more in depth. Sorry for the delay. Did you get a chance to look at this yet? -- Thanks, Tadeusz