From: Jiri Pirko <jiri@resnulli•us>
To: Jia-Ju Bai <baijiaju1990@gmail•com>
Cc: jhs@mojatatu•com, xiyou.wangcong@gmail•com, davem@davemloft•net,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: Re: [PATCH v3] net: sched: Fix a possible null-pointer dereference in dequeue_func()
Date: Mon, 29 Jul 2019 10:42:28 +0200 [thread overview]
Message-ID: <20190729084228.GD2211@nanopsycho> (raw)
In-Reply-To: <20190729082433.28981-1-baijiaju1990@gmail.com>
Mon, Jul 29, 2019 at 10:24:33AM 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.
>
>Fixes: 76e3cc126bb2 ("codel: Controlled Delay AQM")
>Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail•com>
Reviewed-by: Jiri Pirko <jiri@mellanox•com>
next prev parent reply other threads:[~2019-07-29 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-29 8:24 [PATCH v3] net: sched: Fix a possible null-pointer dereference in dequeue_func() Jia-Ju Bai
2019-07-29 8:42 ` Jiri Pirko [this message]
2019-07-29 16:47 ` David Miller
2019-07-29 17:23 ` Cong Wang
2019-08-05 8:05 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190729084228.GD2211@nanopsycho \
--to=jiri@resnulli$(echo .)us \
--cc=baijiaju1990@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jhs@mojatatu$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox