Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3117369ybi; Mon, 29 Jul 2019 01:10:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzH5TQRmFkkSky1uW1/evDuaVXHrYOszpyFiDhNc55tkOI0yLZf/J+O816LO1myEa6rXz07 X-Received: by 2002:a65:464d:: with SMTP id k13mr92696702pgr.99.1564387816947; Mon, 29 Jul 2019 01:10:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564387816; cv=none; d=google.com; s=arc-20160816; b=m3sIaYya4bmRpKnBOk+USOblB++fxRiOPULfI+dJu2gUIqxwYsSrLGrQCfmAnNmnbb e+WdT6afHr1G1Z265wO75SVgCtuVCaNOcye/XNUxtbQO1vBhsyGoQtcsqGw18oW2/vMn e8M1WbbhElGAPPRZKuO1ds+62wTowiixkgp7PiQZdscx8LLW1Geu+oYuKDiTaQeMCZzi qL5yZGanvAHVzHhE2qPz+FdMbgECQFVxWFO9b4BzcYqOGCu0MKVeEmp+YujujKsL4AAR 3wtwe4sJqOcc2j1PLyiklNwS1xD4Koq0kpl9MO+zfGiTyvbqtORzu62NLWWmC65dBNSs K70g== 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:dkim-signature; bh=ORbzlsHDa5hfAtYywIFIzyHDT+ZvebWOt6YTGvwMpig=; b=FeMJPNkIMN9mTWH70dolBDM0ZwQIO5/BlYiOnA1nnKGEn6NxTe6vsHKlUuXJV8c3IN ZCdShqcuzurMUNrEOBvVwc9UecCKDOaAsgMqBI5h+pq9NWVsEG1boCsrWcgRO4DadX31 SpPZc2sE/BXB2Bj3Rn1A3kWDf4fKEWAIuzbOmfWX4v2HOHJVSqpBHXEcQrpBVirdhrM0 07CJdCyNLUInnc9H8rwkNva3ld9kfmp9TgiDXOxnHF3njkuJCnlXDP8bVAVAr+NOU3kF 3obrwjFc7BNTcRXKepSKmnsFpzuxXw6MbMd+5rXKTh4ZRfy8KfZS6JzJrJhi6rN3O+BG Ai2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=U3Oyx9zN; 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 q2si23616579plh.56.2019.07.29.01.10.00; Mon, 29 Jul 2019 01:10:16 -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; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=U3Oyx9zN; 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 S1726820AbfG2Hl2 (ORCPT + 99 others); Mon, 29 Jul 2019 03:41:28 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37280 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfG2Hl2 (ORCPT ); Mon, 29 Jul 2019 03:41:28 -0400 Received: by mail-wr1-f65.google.com with SMTP id n9so35550414wrr.4 for ; Mon, 29 Jul 2019 00:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ORbzlsHDa5hfAtYywIFIzyHDT+ZvebWOt6YTGvwMpig=; b=U3Oyx9zN4u2Gtbuvjv+zgxcVNpE6ZKb70DCl4DIEj3I4V9ml3D84LExFTzRYkfan6s NRYpbieyI3krseoucYfTo3uWhnm/qloBGOsfAQeLeKSMTPmLVq5mhJNmvLkNWMpW3kw0 8N7dxwE0J4bRWdRsK2a/ECi91IdaNWUrY6huK4eVd0YX1WVVHXNfCjobSYS+9Q7Aaahr T2G43s/XcEQ8J+Kdb1dFGpzgHBXSXiAC8fhlwt7V+KlWya1e7Ew0hv/VYl9wPNUvz8X7 eCbL/7s2XVxgsrzOo5tkUEXOyGnO97DA9+NRaWTJKc56tnKpHdiFA0MikkGwnPtx2ZT5 nmcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ORbzlsHDa5hfAtYywIFIzyHDT+ZvebWOt6YTGvwMpig=; b=idlVAayHhTJnWC//nH2uBHDB2HyDhpNjo9swGT9yw4w96LvmTLLwJ0cIKu2f0Fl1pH EjHu7ZH84wPqUy0loPNRYx5nORsGmZN2XgRTXDF9UeI4bNI3I4Wqb8sv2nZ1feyoMTQt jgpuS5RIYyICWfWd7PEcl8uk9Pk8SxIRFx3j8r417m/pagwMmbzQuu49SeeuLTmIMcNO 9w0fpEpnkEI3k1bxC/nABGhMq0pJVwM+uylmTq0OBWIOACIHlFoxwsK+Ud6T09RgJoIL rXXpVhnj5Y9KpgUzEQ9f9zugRMxUPr9OJJHH/cUHEOPa5FV32JF9RTmAJ+4QwWk9kkts iOSA== X-Gm-Message-State: APjAAAUupX9hRrlbow8NVdUxQh5FhFhKfWOsHYA4zu8qgFK+SXcJX9W+ 98CYA4DgsUKLKz33JNR1wPM= X-Received: by 2002:a5d:43c9:: with SMTP id v9mr45383532wrr.70.1564386086100; Mon, 29 Jul 2019 00:41:26 -0700 (PDT) Received: from localhost (mail.chocen-mesto.cz. [85.163.43.2]) by smtp.gmail.com with ESMTPSA id v18sm63277633wrs.80.2019.07.29.00.41.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 00:41:25 -0700 (PDT) Date: Mon, 29 Jul 2019 09:41:25 +0200 From: Jiri Pirko To: Jia-Ju Bai Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: sched: Fix a possible null-pointer dereference in dequeue_func() Message-ID: <20190729074125.GB2211@nanopsycho> References: <20190729022157.18090-1-baijiaju1990@gmail.com> <20190729065653.GA2211@nanopsycho> <4752bf67-7a0c-7bc9-3d54-f18361085ba2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4752bf67-7a0c-7bc9-3d54-f18361085ba2@gmail.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Mon, Jul 29, 2019 at 09:32:00AM CEST, baijiaju1990@gmail.com wrote: > > >On 2019/7/29 14:56, Jiri Pirko wrote: >> Mon, Jul 29, 2019 at 04:21:57AM CEST, baijiaju1990@gmail.com wrote: >> > In dequeue_func(), there is an if statement on line 74 to check whether >> > skb is NULL: >> > if (skb) >> > >> > When skb is NULL, it is used on line 77: >> > prefetch(&skb->end); >> > >> > Thus, a possible null-pointer dereference may occur. >> > >> > To fix this bug, skb->end is used when skb is not NULL. >> > >> > This bug is found by a static analysis tool STCheck written by us. >> > >> > Signed-off-by: Jia-Ju Bai >> Fixes tag, please? > >Sorry, I do not know what "fixes tag" means... >I just find a possible bug and fix it in this patch. git log |grep Fixes: If A fix goes to -net tree, it most probably fixes some bug introduced by some commit in the past. So this tag is to put a reference. > > >Best wishes, >Jia-Ju Bai