lkml.org 
[lkml]   [2022]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4] char: pcmcia: scr24x_cs: Fix use-after-free in scr24x_fops
On Mon, Sep 19, 2022 at 11:45:27AM +0200, Greg KH wrote:
> On Mon, Sep 19, 2022 at 02:38:01AM -0700, Hyunwoo Kim wrote:
> > A race condition may occur if the user physically removes the
> > pcmcia device while calling open() for this char device node.
> >
> > This is a race condition between the scr24x_open() function and
> > the scr24x_remove() function, which may eventually result in UAF.
> >
> > So, add a mutex to the scr24x_open() and scr24x_remove() functions
> > to avoid race contidion of krefs.
> >
> > Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com>
> > Reported-by: kernel test robot <lkp@intel.com>
>
> The robot did not report this original problem :(
>
> > ---
> > drivers/char/pcmcia/scr24x_cs.c | 73 +++++++++++++++++++++++----------
> > 1 file changed, 52 insertions(+), 21 deletions(-)
>
> You failed to put below the --- line what changed from previous versions
> as the documentation asks for.

thank you for telling me.

I submitted a fixed v5 patch.


Regards,
Hyunwoo Kim.

\
 
 \ /
  Last update: 2022-09-19 12:42    [W:0.032 / U:1.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site