[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALQpDLfMjAE9_VtMO6e_iiPrciFNbksLQT3AB3QTGwZCNf5=sA@mail.gmail.com>
Date: Sat, 31 Dec 2022 19:05:36 +0900
From: Yoochan Lee <yoochan1026@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: matt.hsiao@....com, arnd@...db.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: hpilo: Fix use-after-free in ilo_open
Hi,
I haven't tested with a physical device cause I don't have a real device.
I found this bug through static analysis.
This type of bug is similar to [1] and [2].
And I'm sorry that my patch is incorrect.
It's my first time patching a Linux kernel myself.
So I'm not familiar with how to patch it well (For this reason, my
patches are referred to [1] and [2]).
Then, how should I patch it?
[1] https://lore.kernel.org/lkml/20220919040457.GA302681@ubuntu/
[2] https://lore.kernel.org/lkml/20220919101825.GA313940@ubuntu/
2022년 12월 31일 (토) 오후 6:58, Greg KH <gregkh@...uxfoundation.org>님이 작성:
>
> On Sat, Dec 31, 2022 at 02:53:10PM +0900, Yoochan Lee wrote:
> > --- a/drivers/misc/hpilo.h
> > +++ b/drivers/misc/hpilo.h
> > @@ -62,6 +62,7 @@ struct ilo_hwinfo {
> > spinlock_t fifo_lock;
> >
> > struct cdev cdev;
> > + struct kref refcnt;
>
> This is obviously incorrect, please never have 2 reference counts for
> the same structure.
>
> greg k-h
Powered by blists - more mailing lists