From: Oliver Neukum <oneukum@suse.com>
To: Phong Tran <tranmanphong@gmail.com>,
syzbot+495dab1f175edc9c2f13@syzkaller.appspotmail.com
Cc: alex.theissen@me.com, andreyknvl@google.com,
linux-usb@vger.kernel.org, 2pi@mok.nu,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] [PATCH] usb: appledisplay: fix use-after-free in bl_get_brightness
Date: Thu, 07 Nov 2019 09:50:29 +0100 [thread overview]
Message-ID: <1573116629.3024.1.camel@suse.com> (raw)
In-Reply-To: <d6c628d0-71ad-7343-d80e-1b0cd0795242@gmail.com>
Am Mittwoch, den 06.11.2019, 21:22 +0700 schrieb Phong Tran:
> compare with message size (2) can be considered.
>
> if (retval == 2) {
> brightness = pdata->msgdata[1];
> } else {
> retval = -EMSGSIZE;
> }
If you do it that way, the error reporting will be distorted.
Hence I did it a bit more complexly.
Regards
Oliver
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
WARNING: multiple messages have this Message-ID (diff)
From: Oliver Neukum <oneukum@suse.com>
To: Phong Tran <tranmanphong@gmail.com>,
syzbot+495dab1f175edc9c2f13@syzkaller.appspotmail.com
Cc: 2pi@mok.nu, alex.theissen@me.com, andreyknvl@google.com,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org, syzkaller-bugs@googlegroups.com,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] usb: appledisplay: fix use-after-free in bl_get_brightness
Date: Thu, 07 Nov 2019 09:50:29 +0100 [thread overview]
Message-ID: <1573116629.3024.1.camel@suse.com> (raw)
In-Reply-To: <d6c628d0-71ad-7343-d80e-1b0cd0795242@gmail.com>
Am Mittwoch, den 06.11.2019, 21:22 +0700 schrieb Phong Tran:
> compare with message size (2) can be considered.
>
> if (retval == 2) {
> brightness = pdata->msgdata[1];
> } else {
> retval = -EMSGSIZE;
> }
If you do it that way, the error reporting will be distorted.
Hence I did it a bit more complexly.
Regards
Oliver
next prev parent reply other threads:[~2019-11-07 9:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 14:31 KASAN: use-after-free Read in appledisplay_bl_get_brightness syzbot
2019-09-23 14:53 ` Alexander Theißen
2019-11-05 23:36 ` [Linux-kernel-mentees] [PATCH] usb: appledisplay: fix use-after-free in bl_get_brightness Phong Tran
2019-11-05 23:36 ` Phong Tran
2019-11-06 11:42 ` [Linux-kernel-mentees] " Oliver Neukum
2019-11-06 11:42 ` Oliver Neukum
2019-11-06 12:26 ` [Linux-kernel-mentees] KASAN: use-after-free Read in appledisplay_bl_get_brightness syzbot
2019-11-06 12:26 ` syzbot
2019-11-06 14:22 ` [Linux-kernel-mentees] [PATCH] usb: appledisplay: fix use-after-free in bl_get_brightness Phong Tran
2019-11-06 14:22 ` Phong Tran
2019-11-07 8:50 ` Oliver Neukum [this message]
2019-11-07 8:50 ` Oliver Neukum
2019-11-06 12:10 ` [Linux-kernel-mentees] " Andrey Konovalov via Linux-kernel-mentees
2019-11-06 12:10 ` Andrey Konovalov
2019-11-06 12:11 ` [Linux-kernel-mentees] " Andrey Konovalov via Linux-kernel-mentees
2019-11-06 12:11 ` Andrey Konovalov
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=1573116629.3024.1.camel@suse.com \
--to=oneukum@suse.com \
--cc=2pi@mok.nu \
--cc=alex.theissen@me.com \
--cc=andreyknvl@google.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=syzbot+495dab1f175edc9c2f13@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
--cc=tranmanphong@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.