lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 01 Apr 2019 10:22:20 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     edumazet@...gle.com
Cc:     netdev@...r.kernel.org, eric.dumazet@...il.com, ja@....bg
Subject: Re: [PATCH net] tcp: fix tcp_inet6_sk() for 32bit kernels

From: Eric Dumazet <edumazet@...gle.com>
Date: Mon,  1 Apr 2019 03:09:20 -0700

> It turns out that struct ipv6_pinfo is not located as we think.
> 
> inet6_sk_generic() and tcp_inet6_sk() disagree on 32bit kernels by 4-bytes,
> because struct tcp_sock has 8-bytes alignment,
> but ipv6_pinfo size is not a multiple of 8.
> 
> sizeof(struct ipv6_pinfo): 116 (not padded to 8)
> 
> I actually first coded tcp_inet6_sk() as this patch does, but thought
> that "container_of(tcp_sk(sk), struct tcp6_sock, tcp)" was cleaner.
> 
> As Julian told me : Nobody should use tcp6_sock.inet6
> directly, it should be accessed via tcp_inet6_sk() or inet6_sk().
> 
> This happened when we added the first u64 field in struct tcp_sock.
> 
> Fixes: 93a77c11ae79 ("tcp: add tcp_inet6_sk() helper")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Bisected-by: Julian Anastasov <ja@....bg>

This looks like a net-next change, because the Fixes tag commit is only
there.  So that's where I have applied it.

Maybe we should change the name of the tcp6_sock.inet6 member if it
should never be accessed directly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ