]> git.feebdaed.xyz Git - 0xmirror/cilium.git/commitdiff
bpf: align ipv6_ct_tuple
authorFabian Fischer <fabian.fischer@isovalent.com>
Fri, 19 Dec 2025 07:13:10 +0000 (08:13 +0100)
committerJulian Wiedmann <julianwiedmann@users.noreply.github.com>
Fri, 19 Dec 2025 15:20:39 +0000 (15:20 +0000)
The ipv6_ct_tuple struct is a packed struct. Adding more vars on the
stack can easily cause verifier failures due to misaligned access in
the ipv6_addr_copy directly below.

Signed-off-by: Fabian Fischer <fabian.fischer@isovalent.com>
bpf/lib/conntrack.h

index 1e5fcfb33ddd77e7109fa2200028cbba7fe2e585..cb4c9a13f3d38faf652c0080171c8fb3ba0cae58 100644 (file)
@@ -1091,7 +1091,7 @@ static __always_inline int ct_create6(const void *map_main, const void *map_rela
 
        if (map_related != NULL) {
                /* Create an ICMPv6 entry to relate errors */
-               struct ipv6_ct_tuple icmp_tuple = {
+               struct ipv6_ct_tuple icmp_tuple __align_stack_8 = {
                        .nexthdr = IPPROTO_ICMPV6,
                        .sport = 0,
                        .dport = 0,