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:   Thu, 9 Feb 2017 08:29:37 +0100
From:   Heiko Schocher <hs@...x.de>
To:     Florian Fainelli <f.fainelli@...il.com>
Cc:     netdev@...r.kernel.org, maowenan <maowenan@...wei.com>,
        andrew@...n.ch, rmk+kernel@...linux.org.uk, festevam@...il.com,
        davem@...emloft.net, nikita.yoush@...entembedded.com
Subject: Re: [net, v3, 1/3] net: phy: Fix PHY module checks and NULL deref in
 phy_attach_direct()

Hello Florian,

Am 09.02.2017 um 08:13 schrieb Florian Fainelli:
>
>
> On 02/08/2017 10:58 PM, Heiko Schocher wrote:
>> Hello Florian,
>>
>> Am 09.02.2017 um 01:13 schrieb Florian Fainelli:
>>> The Generic PHY drivers gets assigned after we checked that the current
>>> PHY driver is NULL, so we need to check a few things before we can
>>> safely dereference d->driver. This would be causing a NULL deference to
>>> occur when a system binds to the Generic PHY driver. Update
>>> phy_attach_direct() to do the following:
>>>
>>> - grab the driver module reference after we have assigned the Generic
>>>     PHY drivers accordingly
>>>
>>> - update the error path to clean up the module reference in case the
>>>     Generic PHY probe function fails
>>>
>>> Fixes: cafe8df8b9bc ("net: phy: Fix lack of reference count on PHY
>>> driver")
>>> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
>>> ---
>>>    drivers/net/phy/phy_device.c | 16 +++++++++++++++-
>>>    1 file changed, 15 insertions(+), 1 deletion(-)
>>
>> just stumbled over this bug on an am335x based board, with an
>> KSZ8081 attached, so there a "fixed-link" is used like:
>> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arm/boot/dts/am335x-baltos-ir3220.dts#n105
>>
>>
>> With your patch it crashes also ...
>
> The final version of the patch is here:
>
> http://patchwork.ozlabs.org/patch/725923/

Huh, sorry ...

> Do you mind giving it a try?

With this patch, ethernet works again fine on this board, thanks!

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ