lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] blktrace: Fix uaf in blk_trace access after removing by sysfs
On Fri, Sep 10, 2021 at 05:21:20PM +0800, Zhihao Cheng wrote:
> + else {
> + /*
> + * Don't remove blk_trace under running state, in
> + * case triggering use-after-free in function
> + * __blk_add_trace().
> + */
> + if (bt->trace_state != Blktrace_running)
> + ret = blk_trace_remove_queue(q);
> + else
> + ret = -EBUSY;
> + }
> goto out_unlock_bdev;

So who is going to eventually call blk_trace_free in this case?

Also Having the check in blk_trace_remove_queue would seem a little
cleaner.

\
 
 \ /
  Last update: 2021-09-22 07:22    [W:0.045 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site