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: <16e61611ecc9209bdf7de68f77804793386850dd.camel@redhat.com>
Date: Tue, 09 Jul 2024 12:40:22 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Chengen Du <chengen.du@...onical.com>, Michal Kubiak
	 <michal.kubiak@...el.com>
Cc: Florian Westphal <fw@...len.de>, jhs@...atatu.com,
 xiyou.wangcong@...il.com,  jiri@...nulli.us, davem@...emloft.net,
 edumazet@...gle.com, kuba@...nel.org,  ozsh@...dia.com, paulb@...dia.com,
 marcelo.leitner@...il.com,  netdev@...r.kernel.org,
 linux-kernel@...r.kernel.org, Gerald Yang <gerald.yang@...onical.com>
Subject: Re: [PATCH net v2] net/sched: Fix UAF when resolving a clash

On Mon, 2024-07-08 at 17:39 +0800, Chengen Du wrote:
> On Mon, Jul 8, 2024 at 4:33 PM Michal Kubiak <michal.kubiak@...el.com> wrote:
> > For example, if "nf_conntrack_confirm()" returns NF_ACCEPT, (even after
> > the clash resolving), I would not expect calling "goto drop".
> > That is why I suggested a less invasive solution which is just blocking
> > calling "tcf_ct_flow_table_process_conn()" where there is a risk of UAF.
> > So, I asked if such solution would work in case of this function.
> 
> Thank you for expressing your concerns in detail.
> 
> In my humble opinion, skipping the addition of an entry in the flow
> table is controlled by other logic and may not be suitable to mix with
> error handling. If nf_conntrack_confirm returns NF_ACCEPT, I believe
> there is no reason for nf_ct_get to fail. The nf_ct_get function
> simply converts skb->_nfct into a struct nf_conn type. The only
> instance it might fail is when CONFIG_NF_CONNTRACK is disabled. The
> CONFIG_NET_ACT_CT depends on this configuration and determines whether
> act_ct.c needs to be compiled. Actually, the "goto drop" logic is
> included for completeness and might only be relevant if the memory is
> corrupted. Perhaps we could wrap the judgment with "unlikely" to
> emphasize this point?

I agree with Michal, I think it should be better to just skip
tcf_ct_flow_table_process_conn() in case of clash to avoid potential
behavior changes.

Thanks,

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ