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: <a44f412e-dbde-93e9-be72-78515fa5b9d4@cumulusnetworks.com>
Date:   Mon, 25 May 2020 11:34:17 +0300
From:   Nikolay Aleksandrov <nikolay@...ulusnetworks.com>
To:     Horatiu Vultur <horatiu.vultur@...rochip.com>,
        roopa@...ulusnetworks.com, davem@...emloft.net, kuba@...nel.org,
        andrew@...n.ch, UNGLinuxDriver@...rochip.com,
        bridge@...ts.linux-foundation.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     syzbot+9c6f0f1f8e32223df9a4@...kaller.appspotmail.com
Subject: Re: [PATCH] bridge: mrp: Fix out-of-bounds read in br_mrp_parse

On 25/05/2020 12:55, Horatiu Vultur wrote:
> The issue was reported by syzbot. When the function br_mrp_parse was
> called with a valid net_bridge_port, the net_bridge was an invalid
> pointer. Therefore the check br->stp_enabled could pass/fail
> depending where it was pointing in memory.
> The fix consists of setting the net_bridge pointer if the port is a
> valid pointer.
> 
> Reported-by: syzbot+9c6f0f1f8e32223df9a4@...kaller.appspotmail.com
> Fixes: 6536993371fa ("bridge: mrp: Integrate MRP into the bridge")
> Signed-off-by: Horatiu Vultur <horatiu.vultur@...rochip.com>
> ---
>  net/bridge/br_mrp_netlink.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/net/bridge/br_mrp_netlink.c b/net/bridge/br_mrp_netlink.c
> index 397e7f710772a..4a08a99519b04 100644
> --- a/net/bridge/br_mrp_netlink.c
> +++ b/net/bridge/br_mrp_netlink.c
> @@ -27,6 +27,12 @@ int br_mrp_parse(struct net_bridge *br, struct net_bridge_port *p,
>  	struct nlattr *tb[IFLA_BRIDGE_MRP_MAX + 1];
>  	int err;
>  
> +	/* When this function is called for a port then the br pointer is
> +	 * invalid, therefor set the br to point correctly
> +	 */
> +	if (p)
> +		br = p->br;
> +
>  	if (br->stp_enabled != BR_NO_STP) {
>  		NL_SET_ERR_MSG_MOD(extack, "MRP can't be enabled if STP is already enabled");
>  		return -EINVAL;
> 

You should tag the fix for net-next when it's intended for it.

Acked-by: Nikolay Aleksandrov <nikolay@...ulusnetworks.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ