Re: [PATCH] netfilter: synproxy: fix unaligned access to TCP timestamp option
From: Fernando Fernandez Mancera
Date: Sun Jun 07 2026 - 17:27:21 EST
On 6/7/26 6:44 PM, Rosen Penev wrote:
synproxy_tstamp_adjust() reads and writes the TSval and TSecr fields ofHi,
the TCP Timestamp option via direct __be32 pointer dereferences. These
fields are at byte offsets 2 and 6 within the option, which are only
2-byte aligned — not 4-byte aligned for __be32 access.
Replace with get_unaligned_be32() / put_unaligned_be32() to safely
handle the unaligned access on strict-alignment architectures.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
as mentioned on [1] this was already fixed in [2]..
[1] https://lore.kernel.org/netdev/a8cfeb06-6ffb-49f2-a14d-c5a50bc4e5be@xxxxxxx/
[2] https://lore.kernel.org/netfilter-devel/20260525124450.6043-4-fmancera@xxxxxxx/
Thanks,
Fernando.