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] [day] [month] [year] [list]
Message-ID: <YyO4P50YeI0wlGM2@riccipc>
Date:   Fri, 16 Sep 2022 01:41:51 +0200
From:   Roberto Ricci <rroberto2r@...il.com>
To:     Ido Schimmel <idosch@...sch.org>
Cc:     edumazet@...gle.com, davem@...emloft.net, yoshfuji@...ux-ipv6.org,
        dsahern@...nel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: BUG: unable to handle page fault for address, with ipv6.disable=1

On 2022-09-14 Wed 18:47:12 +0300, Ido Schimmel wrote:
> This is most likely caused by commit 0daf07e52709 ("raw: convert raw
> sockets to RCU") which is being back ported to stable kernels.
> 
> It made the initialization of 'raw_v6_hashinfo' conditional on IPv6
> being enabled. Can you try the following patch (works on my end)?
> 
> diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
> index 19732b5dce23..d40b7d60e00e 100644
> --- a/net/ipv6/af_inet6.c
> +++ b/net/ipv6/af_inet6.c
> @@ -1072,13 +1072,13 @@ static int __init inet6_init(void)
>  	for (r = &inetsw6[0]; r < &inetsw6[SOCK_MAX]; ++r)
>  		INIT_LIST_HEAD(r);
>  
> +	raw_hashinfo_init(&raw_v6_hashinfo);
> +
>  	if (disable_ipv6_mod) {
>  		pr_info("Loaded, but administratively disabled, reboot required to enable\n");
>  		goto out;
>  	}
>  
> -	raw_hashinfo_init(&raw_v6_hashinfo);
> -
>  	err = proto_register(&tcpv6_prot, 1);
>  	if (err)
>  		goto out;
> 
> Another approach is the following, but I prefer the first:
> 
> diff --git a/net/ipv4/raw_diag.c b/net/ipv4/raw_diag.c
> index 999321834b94..4fbdd69a2be8 100644
> --- a/net/ipv4/raw_diag.c
> +++ b/net/ipv4/raw_diag.c
> @@ -20,7 +20,7 @@ raw_get_hashinfo(const struct inet_diag_req_v2 *r)
>  	if (r->sdiag_family == AF_INET) {
>  		return &raw_v4_hashinfo;
>  #if IS_ENABLED(CONFIG_IPV6)
> -	} else if (r->sdiag_family == AF_INET6) {
> +	} else if (r->sdiag_family == AF_INET6 && ipv6_mod_enabled()) {
>  		return &raw_v6_hashinfo;
>  #endif
>  	} else {

Both the solutions you proposed work for me. Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ