Files
linux-stable-mirror/net
Fernando Fernandez ManceraandGreg Kroah-Hartman fc2900a908 netfilter: nfnetlink_osf: fix mss parsing on big-endian architectures
[ Upstream commit a625c94144 ]

The MSS calculation in nf_osf_match_one() manually shifts bytes to
construct a 16-bit value before passing it to ntohs().

This works on little-endian hosts but it does not work on big-endian as
the bytes are being always shifted and set in the same way for all
architectures.

Use get_unaligned_be16() to fix this on big-endian systems. It also
simplifies the code.

Fixes: 11eeef41d5 ("netfilter: passive OS fingerprint xtables match")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-07-24 15:54:38 +02:00
..
2026-06-19 13:36:54 +02:00