mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Hsiao <matt.hsiao@hpe.com>
To: Yoochan Lee <yoochan1026@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	arnd@arndb.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: hpilo: Fix use-after-free in ilo_open
Date: Tue, 3 Jan 2023 10:35:31 +0800	[thread overview]
Message-ID: <20230103023531.GA26527@blofly.tw.rdlabs.hpecorp.net> (raw)
In-Reply-To: <CALQpDLdqW9UYfk_3AKXk-yiCtUize=HXDTM6h-nurH31j9FN8A@mail.gmail.com>

On Sun, Jan 01, 2023 at 10:19:14AM +0900, Yoochan Lee wrote:
> > And how can this device actually be removed from the system?  Is that
> > possible with this hardware?
> HP ILO device is connected by using LAN cable.
> Therefore, the detach function is triggered when the attacker
> physically detaches the LAN cable connected to the HP ILO device.

This is incorrect.

The iLO device is an SoC attached directly on the PCB board.
It cannot be removed like a PCMCIA card that you referred so the
patch cannot apply the same to iLO. This iLO SoC does have a NIC, but
detach the LAN cable connected to it does not remove the SoC itself from
the host CPU.

> 
> > And again, this is not the correct solution as you have way too many
> > reference counts happening here.  Please become more familiar with how
> > these all work before adding another one and causing more problems like
> > this patch did :(
> Okay, I'll find a better way to patch this bug.
> 
> Sincerely,
> Yoochan
> 
> 2022년 12월 31일 (토) 오후 10:48, Greg KH <gregkh@linuxfoundation.org>님이 작성:
> >
> > A: http://en.wikipedia.org/wiki/Top_post 
> > Q: Were do I find info about this thing called top-posting?
> > A: Because it messes up the order in which people normally read text.
> > Q: Why is top-posting such a bad thing?
> > A: Top-posting.
> > Q: What is the most annoying thing in e-mail?
> >
> > A: No.
> > Q: Should I include quotations after my reply?
> >
> > http://daringfireball.net/2007/07/on_top 
> >
> > On Sat, Dec 31, 2022 at 10:06:19PM +0900, Yoochan Lee wrote:
> > > Thanks.
> > >
> > > Since I don't have a real device, it is difficult to verify the bug dynamically.
> > > However, this type of race condition (i.e., b/w remove device and
> > > fops) is prevalently founded recently[1-3].
> > > Therefore, I think this bug can be triggered if a real device exists.
> >
> > And how can this device actually be removed from the system?  Is that
> > possible with this hardware?
> >
> > > The main reason for this race condition (i.e., b/w detach and fops) is
> > > there is no proper lock mechanism.
> > > I think the detach device function is delayed until the other
> > > operations (e.g., fops) is finished.
> > > To this end, I use kref to wait for the other operations.
> >
> > And again, this is not the correct solution as you have way too many
> > reference counts happening here.  Please become more familiar with how
> > these all work before adding another one and causing more problems like
> > this patch did :(
> >
> > > The tool I am making is currently under development, and it can find
> > > the race condition between detach function and fops.
> >
> > Then you MUST document this as it looks like your tool needs work.
> > Please read Documentation/process/researcher-guidelines.rst for what you
> > MUST do if you use a tool to find "issues" and send out random patches.
> >
> > good luck!
> >
> > greg k-h

  reply	other threads:[~2023-01-03  2:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-31  5:53 Yoochan Lee
2022-12-31  8:50 ` kernel test robot
2022-12-31  8:56   ` Yoochan Lee
2022-12-31  9:23     ` Yoochan Lee
2022-12-31  9:57 ` Greg KH
2022-12-31  9:58 ` Greg KH
2022-12-31 10:05   ` Yoochan Lee
2022-12-31 11:46     ` Greg KH
2022-12-31 13:06       ` Yoochan Lee
2022-12-31 13:48         ` Greg KH
2023-01-01  1:19           ` Yoochan Lee
2023-01-03  2:35             ` Matt Hsiao [this message]
2022-12-31 10:31 ` kernel test robot
2022-12-31 10:31 ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230103023531.GA26527@blofly.tw.rdlabs.hpecorp.net \
    --to=matt.hsiao@hpe.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yoochan1026@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®