From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: cpaasch@apple.com, netdev@vger.kernel.org,
bhole_prashant_q7@lab.ntt.co.jp, tyhicks@canonical.com
Subject: Re: [PATCH net] net: Prevent invalid access to skb->prev in __qdisc_drop_all
Date: Thu, 29 Nov 2018 15:53:37 -0800 (PST) [thread overview]
Message-ID: <20181129.155337.70390658665793928.davem@davemloft.net> (raw)
In-Reply-To: <d9fa4295-b229-0db9-a3d1-c20376f1df75@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 29 Nov 2018 15:09:18 -0800
> diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
> index 2c38e3d0792468162ee0dc4137f1400160ab9276..22cd46a600576f286803536d45875cd9d537cdca 100644
> --- a/net/sched/sch_netem.c
> +++ b/net/sched/sch_netem.c
> @@ -431,6 +431,9 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,
> int count = 1;
> int rc = NET_XMIT_SUCCESS;
>
> + /* Do not fool qdisc_drop_all() */
> + skb->prev = NULL;
> +
> /* Random duplication */
> if (q->duplicate && q->duplicate >= get_crandom(&q->dup_cor))
> ++count;
If this works I definitely prefer it to making the entire stack pay the
price to fix this crash.
next prev parent reply other threads:[~2018-11-30 11:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-29 22:27 [PATCH net] net: Prevent invalid access to skb->prev in __qdisc_drop_all Christoph Paasch
2018-11-29 22:44 ` Eric Dumazet
2018-11-29 22:55 ` Christoph Paasch
2018-11-29 23:09 ` Eric Dumazet
2018-11-29 23:45 ` Christoph Paasch
2018-11-29 23:59 ` David Miller
2018-11-29 23:53 ` David Miller [this message]
2018-11-30 0:00 ` Christoph Paasch
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=20181129.155337.70390658665793928.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bhole_prashant_q7@lab.ntt.co.jp \
--cc=cpaasch@apple.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=tyhicks@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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