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:   Tue, 10 May 2022 17:12:05 -0400
From:   Jamal Hadi Salim <jhs@...atatu.com>
To:     Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org
Cc:     Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>
Subject: Re: [PATCH v3 net] net/sched: act_pedit: really ensure the skb is
 writable

On 2022-05-10 10:57, Paolo Abeni wrote:
> Currently pedit tries to ensure that the accessed skb offset
> is writable via skb_unclone(). The action potentially allows
> touching any skb bytes, so it may end-up modifying shared data.
> 
> The above causes some sporadic MPTCP self-test failures, due to
> this code:
> 
> 	tc -n $ns2 filter add dev ns2eth$i egress \
> 		protocol ip prio 1000 \
> 		handle 42 fw \
> 		action pedit munge offset 148 u8 invert \
> 		pipe csum tcp \
> 		index 100
> 
> The above modifies a data byte outside the skb head and the skb is
> a cloned one, carrying a TCP output packet.
> 
> This change addresses the issue by keeping track of a rough
> over-estimate highest skb offset accessed by the action and ensuring
> such offset is really writable.
> 
> Note that this may cause performance regressions in some scenarios,
> but hopefully pedit is not in the critical path.
> 
> v2 -> v3:
>   - more descriptive commit message (Jamal)
> 
> v1 -> v2:
>   - cleanup hint update (Jakub)
>   - avoid raices while accessing the hint (Jakub)
>   - re-organize the comments for clarity
> 
> Fixes: db2c24175d14 ("act_pedit: access skb->data safely")
> Acked-by: Mat Martineau <mathew.j.martineau@...ux.intel.com>
> Tested-by: Geliang Tang <geliang.tang@...e.com>
> Signed-off-by: Paolo Abeni <pabeni@...hat.com>

Thanks.

Acked-by: Jamal Hadi Salim <jhs@...atatu.com>

cheers,
jamal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ