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: <00babfab-5bd7-4b66-a765-f7c6689543c7@kernel.dk>
Date: Tue, 3 Feb 2026 07:46:20 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Ming Lei <ming.lei@...hat.com>, Michal Koutný
 <mkoutny@...e.com>
Cc: 李龙兴 <coregee2000@...il.com>,
 syzkaller@...glegroups.com, tj@...nel.org, josef@...icpanda.com,
 cgroups@...r.kernel.org, linux-block@...r.kernel.org,
 linux-kernel@...r.kernel.org, yukuai@...as.com
Subject: Re: [Kernel Bug] KASAN: slab-use-after-free Read in
 __blkcg_rstat_flush

On 2/3/26 7:40 AM, Ming Lei wrote:
> On Tue, Feb 03, 2026 at 03:16:43PM +0100, Michal Koutný wrote:
>> On Tue, Feb 03, 2026 at 10:08:07PM +0800, Ming Lei <ming.lei@...hat.com> wrote:
>>> I can't parse your question, here blkg_release() simply needs to flush
>>> all stats. Why do you talk about preventing new flush? why is it related
>>> with this UAF?
>>
>> What prevents this fix:
>>
>> --- a/block/blk-cgroup.c
>> +++ b/block/blk-cgroup.c
>> @@ -169,14 +169,6 @@ static void __blkg_release(struct rcu_head *rcu)
>>  #ifdef CONFIG_BLK_CGROUP_PUNT_BIO
>>         WARN_ON(!bio_list_empty(&blkg->async_bios));
>>  #endif
>> -       /*
>> -        * Flush all the non-empty percpu lockless lists before releasing
>> -        * us, given these stat belongs to us.
>> -        *
>> -        * blkg_stat_lock is for serializing blkg stat update
>> -        */
>> -       for_each_possible_cpu(cpu)
>> -               __blkcg_rstat_flush(blkcg, cpu);
>>
>>         /* release the blkcg and parent blkg refs this blkg has been holding */
>>         css_put(&blkg->blkcg->css);
>> @@ -195,6 +187,15 @@ static void blkg_release(struct percpu_ref *ref)
>>  {
>>         struct blkcg_gq *blkg = container_of(ref, struct blkcg_gq, refcnt);
>>
>> +       /*
>> +        * Flush all the non-empty percpu lockless lists before releasing
>> +        * us, given these stat belongs to us.
>> +        *
>> +        * blkg_stat_lock is for serializing blkg stat update
>> +        */
>> +       for_each_possible_cpu(cpu)
>> +               __blkcg_rstat_flush(blkcg, cpu);
>> +
>>         call_rcu(&blkg->rcu_head, __blkg_release);
>>  }
> 
> This one looks more clever, can you send one formal patch?

I'll drop the previous one for now - I didn't really mind it,
but if we can fix it without, then yeah agree that's better.

-- 
Jens Axboe


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ