lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 18 Jul 2020 14:30:06 +0200
From:   Florian Westphal <fw@...len.de>
To:     wenxu@...oud.cn
Cc:     fw@...len.de, xiyou.wangcong@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH net] net/sched: act_ct: fix restore the qdisc_skb_cb
 after defrag

wenxu@...oud.cn <wenxu@...oud.cn> wrote:
> From: wenxu <wenxu@...oud.cn>
> 
> The fragment packets do defrag in tcf_ct_handle_fragments
> will clear the skb->cb which make the qdisc_skb_cb clear
> too. So the qdsic_skb_cb should be store before defrag and
> restore after that.
> It also update the pkt_len after all the
> fragments finish the defrag to one packet and make the
> following actions counter correct.
> 
> Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct")
> Signed-off-by: wenxu <wenxu@...oud.cn>

Looks ok to me.  One question:

> @@ -1014,6 +1017,7 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
>  
>  out:
>  	tcf_action_update_bstats(&c->common, skb);
> +	qdisc_skb_cb(skb)->pkt_len = skb->len;
>  	return retval;

This appears to be unconditional, I would have expected that
this only done for reassembled skbs?

Otherwise we will lose the value calculated by core via
qdisc_calculate_pkt_len().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ