public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ipv4: cipso potential BUG()
@ 2026-01-19 20:46 Will Rosenberg
  2026-01-19 23:31 ` Paul Moore
  0 siblings, 1 reply; 5+ messages in thread
From: Will Rosenberg @ 2026-01-19 20:46 UTC (permalink / raw)
  To: whrosenb
  Cc: Paul Moore, David S. Miller, David Ahern, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Huw Davies, netdev,
	linux-security-module, linux-kernel

Previously, it was discussed that skb_cow() has a bug due to implicit
integer casting that can lead to a BUG when headroom < -NET_SKB_PAD. We
concluded that it was not worthwhile to fix the root cause and to
instead fix the symptom found in calipso. The thread for this issue can
be found here:

https://lore.kernel.org/netdev/CAHC9VhQmR8A2vz0W-VrrhYNQ2wgCYxHbAmdgmM2yTL-uh4qiOg@mail.gmail.com/

I recently reviewed the use cases of skb_cow() throughout the kernel and
found that cipso_v4_skbuff_setattr() comes very close to triggering the
same BUG. However, I concluded this was not triggerable. Even though
len_delta can become negative, leading to a negative headroom passed to
skb_cow(), we do not satisfy the condition headroom < -NET_SKB_PAD.

Nonetheless, I believe cipso is using skb_cow() dangerously, but since
the issue is not triggerable, would it still make sense to patch it?
I figured I would throw out a quick email. Please let me know and I can
make a similar patch for cipso if necessary.

--
Will Rosenberg

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-22 11:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-19 20:46 ipv4: cipso potential BUG() Will Rosenberg
2026-01-19 23:31 ` Paul Moore
2026-01-20 15:57   ` [PATCH] cipso: harden use of skb_cow() in cipso_v4_skbuff_setattr() Will Rosenberg
2026-01-22  0:48     ` Paul Moore
2026-01-22 11:20     ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox