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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1646191a31be339c81f8b335ff40876145a05908.camel@redhat.com>
Date:   Mon, 19 Apr 2021 12:00:41 +0200
From:   Davide Caratti <dcaratti@...hat.com>
To:     "David S. Miller" <davem@...emloft.net>,
        Jamal Hadi Salim <jhs@...atatu.com>,
        Cong Wang <xiyou.wangcong@...il.com>,
        Jiri Pirko <jiri@...nulli.us>,
        Jakub Kicinski <kuba@...nel.org>, wenxu <wenxu@...oud.cn>,
        Shuang Li <shuali@...hat.com>,
        Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
        netdev@...r.kernel.org
Cc:     "echaudro@...hat.com" <echaudro@...hat.com>
Subject: Re: [PATCH net] net/sched: sch_frag: fix OOB read while processing
 IPv4 fragments

On Fri, 2021-04-16 at 22:29 +0200, Davide Caratti wrote:

[...]
> 
> for IPv4 packets, sch_fragment() uses a temporary struct dst_entry. Then,
> in the following call graph:
> 
>   ip_fragment()

^^ the above line is a typo,

>     ip_do_fragment()
>       ip_skb_dst_mtu()
>         ip_dst_mtu_maybe_forward()
>           ip_mtu_locked()
> 
> a pointer to that struct is casted as pointer to struct rtable, hence the
> OOB stack access. Fix this, changing the temporary variable used for IPv4
> packets in sch_fragment(), similarly to what is done for IPv6 in the same
> function.

and thanks to Eelco's help I just reproduced a similar splat with
openvswitch. Indeed, ovs_fragment() seems to have the same problem [1];
I will follow-up with a series that fixes both data-paths.

-- 
davide

[1] https://elixir.bootlin.com/linux/v5.12-rc8/source/net/openvswitch/actions.c#L813


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ