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]
Message-ID: <Zr0h6a_ExRhw8Mxh@hog>
Date: Wed, 14 Aug 2024 23:30:17 +0200
From: Sabrina Dubroca <sd@...asysnail.net>
To: Feng zhou <zhoufeng.zf@...edance.com>
Cc: edumazet@...gle.com, davem@...emloft.net, kuba@...nel.org,
	pabeni@...hat.com, ast@...nel.org, daniel@...earbox.net,
	andrii@...nel.org, martin.lau@...ux.dev, eddyz87@...il.com,
	song@...nel.org, yonghong.song@...ux.dev, john.fastabend@...il.com,
	kpsingh@...nel.org, sdf@...ichev.me, haoluo@...gle.com,
	jolsa@...nel.org, dsahern@...nel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, bpf@...r.kernel.org,
	yangzhenze@...edance.com, wangdongdong.6@...edance.com
Subject: Re: [PATCH] bpf: Fix bpf_get/setsockopt to tos not take effect when
 TCP over IPv4 via INET6 API

2024-08-14, 16:45:04 +0800, Feng zhou wrote:
> diff --git a/net/core/filter.c b/net/core/filter.c
> index 78a6f746ea0b..9798537044be 100644
> --- a/net/core/filter.c
> +++ b/net/core/filter.c
> @@ -5399,7 +5399,7 @@ static int sol_ip_sockopt(struct sock *sk, int optname,
>  			  char *optval, int *optlen,
>  			  bool getopt)
>  {
> -	if (sk->sk_family != AF_INET)
> +	if (sk->sk_family != AF_INET && !is_tcp_sock_ipv6_mapped(sk))
>  		return -EINVAL;

I don't think this works when CONFIG_IPV6=m, because then
is_tcp_sock_ipv6_mapped will be part of the module and not usable in
net/core/filter.c. Stuff like this is usually done through ipv6_stub.

-- 
Sabrina


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ