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: <Y3JTH8cuZVt5zJkj@black.fi.intel.com>
Date:   Mon, 14 Nov 2022 16:39:27 +0200
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Yuan Can <yuancan@...wei.com>
Cc:     michael.jamet@...el.com, YehezkelShB@...il.com,
        davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
        pabeni@...hat.com, andriy.shevchenko@...ux.intel.com,
        amir.jer.levy@...el.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net: thunderbolt: Fix error handling in tbnet_init()

On Mon, Nov 14, 2022 at 02:22:25PM +0000, Yuan Can wrote:
> A problem about insmod thunderbolt-net failed is triggered with following
> log given while lsmod does not show thunderbolt_net:
> 
>  insmod: ERROR: could not insert module thunderbolt-net.ko: File exists
> 
> The reason is that tbnet_init() returns tb_register_service_driver()
> directly without checking its return value, if tb_register_service_driver()
> failed, it returns without removing property directory, resulting the
> property directory can never be created later.
> 
>  tbnet_init()
>    tb_register_property_dir() # register property directory
>    tb_register_service_driver()
>      driver_register()
>        bus_add_driver()
>          priv = kzalloc(...) # OOM happened
>    # return without remove property directory
> 
> Fix by remove property directory when tb_register_service_driver() returns
> error.
> 
> Fixes: e69b6c02b4c3 ("net: Add support for networking over Thunderbolt cable")
> Signed-off-by: Yuan Can <yuancan@...wei.com>

Acked-by: Mika Westerberg <mika.westerberg@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ