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: <aDkM_cKcsX9eMzFK@ysun46-mobl.ccr.corp.intel.com>
Date: Fri, 30 May 2025 09:42:21 +0800
From: Yi Sun <yi.sun@...el.com>
To: Vinicius Costa Gomes <vinicius.gomes@...el.com>
CC: <dave.jiang@...el.com>, <dmaengine@...r.kernel.org>,
	<linux-kernel@...r.kernel.org>, <xueshuai@...ux.alibaba.com>,
	<gordon.jin@...el.com>
Subject: Re: [PATCH 1/2] dmaengine: idxd: Remove improper idxd_free

On 29.05.2025 18:07, Vinicius Costa Gomes wrote:
>Yi Sun <yi.sun@...el.com> writes:
>
>> On 29.05.2025 09:56, Vinicius Costa Gomes wrote:
>>>Hi,
>>>
>>>Yi Sun <yi.sun@...el.com> writes:
>>>
>>>> The put_device() call can be asynchronous cleanup via schedule_delayed_work
>>>> when CONFIG_DEBUG_KOBJECT_RELEASE is set. This results in a use-after-free
>>>> failure during module unloading if invoking idxd_free() immediately
>>>> afterward.
>>>>
>>>
>>>I think that adding the relevant part of the log would be helpful. (I am
>>>looking at either a similar, or this exact problem, so at least to me it
>>>would be helpful)
>>>
>> The issue is easily reproducible: unloading the module with 'modprobe -r idxd'
>> can trigger the call trace so long as a idxd_free() is called immediately
>> after the put_device().
>>
>
>Most probably the same issue I am looking at then.
>
Yes, and actually, the other patch (patch 2/2: "dmaengine: idxd: Fix refcount
underflow on module unload") addresses a similar issue which is triggered in
the same function and resulting in nearly identical call traces.

There are two separate code changes in idxd/init.c that can lead to a
'refcount_t: underflow; use-after-free' issue, both caused by incorrect
use of put_device().

Thanks
    --Sun, Yi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ