mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Antonio Ospite <ospite@studenti.unina.it>
To: Alan Ott <alan@signal11.us>
Cc: linux-input@vger.kernel.org, Jiri Kosina <jkosina@suse.cz>,
	Oliver Neukum <oliver@neukum.name>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl
Date: Tue, 5 Oct 2010 22:29:17 +0200	[thread overview]
Message-ID: <20101005222917.9f4da7bc.ospite@studenti.unina.it> (raw)
In-Reply-To: <4CA9DC8D.3030207@signal11.us>

[-- Attachment #1: Type: text/plain, Size: 1894 bytes --]

On Mon, 04 Oct 2010 09:54:21 -0400
Alan Ott <alan@signal11.us> wrote:

> On 10/02/2010 07:25 AM, Antonio Ospite wrote:
> > BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
> > IP: [<ffffffffa02c66b4>] hidraw_ioctl+0xfc/0x32c [hid]
> > [...]
> >
[...]
> > there is a similar problem when _writing_ to the device, but Alan's
> > changes in that area are shuffling the code a bit, should I send a patch
> > [to hidraw_send_report()] on top of Alan's work for that, or a fix for
> > current mainline [in hidraw_write()] on which Alan should rebase his
> > work would be better?
> >    
> 
> This needs to go back into stable kernels as well, so a patch against 
> mainline will be necessary for that. If you want to make a patch against 
> mine, that's fine with me. If you want me to work it into my patch, 
> that's fine too. (I want you to get credit for the fix though :) ).
>

Alan rebasing your patch on top of the hidraw_write() fix is trivial
so you do it in your v5, ok? It does not get rebased automatically just
because of the mutex_lock() call.

If it is OK to you I'd promote my Tested-by to a Signed-off-by in
the commit message so to take implicit credit for the fix. But this is
not even needed as the fix will be in mainline anyway.

> > The same pattern of unchecked hidraw_table[minor] is also present in
> > hidraw_get_report but this function is called only after the NULL check
> > in hidraw_ioctl _for_now_, so that is currently safe.
> >    
> 
> I can stick a comment ahead of hidraw_send_report, similar to the one 
> which already exists.
>

ACK.

Thanks,
   Antonio

-- 
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

      reply	other threads:[~2010-10-05 20:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-02 11:25 Antonio Ospite
2010-10-04 13:50 ` Jiri Kosina
2010-10-04 14:11   ` Antonio Ospite
2010-10-05 15:20   ` [PATCH 0/2] HID: hidraw, fix two NULL pointer dereferences Antonio Ospite
2010-10-05 17:42     ` [stable] " Greg KH
2010-10-05 20:16       ` Antonio Ospite
2010-10-06  9:31         ` Jiri Kosina
2010-10-15  7:44           ` Antonio Ospite
2010-10-15  9:10             ` Jiri Kosina
2010-10-05 21:12     ` Jiri Slaby
2010-10-06 10:01       ` Antonio Ospite
2010-10-06 10:09         ` Jiri Slaby
2010-10-09 12:40           ` Antonio Ospite
2010-10-19  9:24             ` [PATCH 1/1] HID: hidraw, fix window in hidraw_release Jiri Slaby
2010-10-19  9:28               ` Jiri Slaby
2010-10-19  9:29               ` Jiri Slaby
2010-10-20 14:55                 ` Jiri Kosina
2010-10-05 15:20   ` [PATCH 1/2] HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl Antonio Ospite
2010-10-05 15:20   ` [PATCH 2/2] HID: hidraw, fix a NULL pointer dereference in hidraw_write Antonio Ospite
2010-10-04 13:54 ` [PATCH] HID: hidraw, fix a NULL pointer dereference in hidraw_ioctl Alan Ott
2010-10-05 20:29   ` Antonio Ospite [this message]

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=20101005222917.9f4da7bc.ospite@studenti.unina.it \
    --to=ospite@studenti.unina.it \
    --cc=alan@signal11.us \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.name \
    /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®