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:	Mon, 23 Feb 2015 15:31:07 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	jiri@...nulli.us
Cc:	netdev@...r.kernel.org
Subject: Re: [patch net] team: fix possible null pointer dereference in
 team_handle_frame

From: Jiri Pirko <jiri@...nulli.us>
Date: Mon, 23 Feb 2015 14:02:54 +0100

> Currently following race is possible in team:
> 
> CPU0                                        CPU1
>                                             team_port_del
>                                               team_upper_dev_unlink
>                                                 priv_flags &= ~IFF_TEAM_PORT
> team_handle_frame
>   team_port_get_rcu
>     team_port_exists
>       priv_flags & IFF_TEAM_PORT == 0
>     return NULL (instead of port got
>                  from rx_handler_data)
>                                               netdev_rx_handler_unregister
> 
> The thing is that the flag is removed before rx_handler is unregistered.
> If team_handle_frame is called in between, team_port_exists returns 0
> and team_port_get_rcu will return NULL.
> So do not check the flag here. It is guaranteed by netdev_rx_handler_unregister
> that team_handle_frame will always see valid rx_handler_data pointer.
> 
> Signed-off-by: Jiri Pirko <jiri@...nulli.us>
> Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")

Applied and queued up for -stable, thanks Jiri.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ