]> git.ipfire.org Git - thirdparty/linux.git/commit
netfilter: synproxy: fix unaligned memory access in timestamp adjustment
authorFernando Fernandez Mancera <fmancera@suse.de>
Tue, 26 May 2026 21:58:29 +0000 (23:58 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 5 Jun 2026 11:11:55 +0000 (13:11 +0200)
commit992c20bc8a4aba220c8b95b467d049289778dad6
treea3b9761a87d072893117c8e5a77de57849566dfe
parent22bb132cfb9b94847d52d73614284b8c5ea8d36e
netfilter: synproxy: fix unaligned memory access in timestamp adjustment

Use get_unaligned_be32() and put_unaligned_be32() to safely read and
write the timestamp fields. This prevents performance degradation due to
unaligned memory access or even a crash on strict alignment
architectures.

This follows the implementation of timestamp parsing in the networking
stack at tcp_parse_options() and synproxy_parse_options().

Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_synproxy_core.c