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]
Date:   Wed, 9 Nov 2022 18:07:07 +0100
From:   Florian Westphal <fw@...len.de>
To:     Daniel Xu <dxu@...uu.xyz>
Cc:     pablo@...filter.org, fw@...len.de, kadlec@...filter.org,
        netfilter-devel@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: ctmark: Fix data-races around ctmark

Daniel Xu <dxu@...uu.xyz> wrote:
> index f97bda06d2a9..669561fb73bd 100644
> --- a/net/netfilter/nf_conntrack_core.c
> +++ b/net/netfilter/nf_conntrack_core.c
> @@ -1781,7 +1781,7 @@ init_conntrack(struct net *net, struct nf_conn *tmpl,
>  			}
>  
>  #ifdef CONFIG_NF_CONNTRACK_MARK
> -			ct->mark = exp->master->mark;
> +			WRITE_ONCE(ct->mark, READ_ONCE(exp->master->mark));

*ct is owned by the current cpu at this point, so WRITE_ONCE is not
needed.

Rest looks fine.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ