Re: [PATCH] netfilter: synproxy: fix unaligned access to TCP timestamp option
From: Rosen Penev
Date: Sun Jun 07 2026 - 17:30:09 EST
On Sun, Jun 7, 2026 at 2:27 PM Fernando Fernandez Mancera
<fmancera@xxxxxxx> wrote:
>
> On 6/7/26 6:44 PM, Rosen Penev wrote:
> > synproxy_tstamp_adjust() reads and writes the TSval and TSecr fields of
> > 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>
> Hi,
>
> as mentioned on [1] this was already fixed in [2]..
OK.
>
> [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.