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]
Message-ID: <87y2wh8m68.fsf@unikie.com>
Date:   Fri, 15 Nov 2019 12:32:31 +0200
From:   jouni.hogander@...kie.com (Jouni Högander)
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>
Subject: Re: [PATCH] drivers/base: Fix memory leak in error paths

Greg Kroah-Hartman <gregkh@...uxfoundation.org> writes:

>> 
>> Ok, did some more debugging on
>> this. net/core/net-sysfs.c:netdev_register_kobject is doing
>> device_initialize(dev). This is in
>> drivers/base/core.c:device_initialize:
>> 
>>  * NOTE: Use put_device() to give up your reference instead of freeing
>>  * @dev directly once you have called this function.
>> 
>> My understanding is that remaining reference on error path is taken by
>> device_initialize and as instructed in the note above it should be given
>> up using put_device?
>
> Yes, that is correct.
>
>> Tested this and it's fixing the memory leak I found in my Syzkaller
>> exercise. Addition to that it seems to be fixing also this one:
>> 
>> https://syzkaller.appspot.com/bug?id=f5f4af9fb9ffb3112ad6e30f717f769decdccdfc
>
> Great!  Care to submit a patch for this?

I will submit another patch and Cc you there. This patch should be ignored.

BR,

Jouni Högander

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ