From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Wenwen Wang <wang6495@umn.edu>
Cc: Kangjie Lu <kjlu@umn.edu>, Adam Radford <aradford@gmail.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] scsi: 3w-9xxx: fix a missing-check bug
Date: Tue, 08 May 2018 01:34:10 -0400 [thread overview]
Message-ID: <yq1muxaww19.fsf@oracle.com> (raw)
In-Reply-To: <1525740413-23443-1-git-send-email-wang6495@umn.edu> (Wenwen Wang's message of "Mon, 7 May 2018 19:46:43 -0500")
Wenwen,
> In twa_chrdev_ioctl(), the ioctl driver command is firstly copied from the
> userspace pointer 'argp' and saved to the kernel object 'driver_command'.
> Then a security check is performed on the data buffer size indicated by
> 'driver_command', which is 'driver_command.buffer_length'. If the security
> check is passed, the entire ioctl command is copied again from the 'argp'
> pointer and saved to the kernel object 'tw_ioctl'. Then, various operations
> are performed on 'tw_ioctl' according to the 'cmd'. Given that the 'argp'
> pointer resides in userspace, a malicious userspace process can race to
> change the buffer size between the two copies. This way, the user can
> bypass the security check and inject invalid data buffer size. This can
> cause potential security issues in the following execution.
>
> This patch checks for capable(CAP_SYS_ADMIN) in twa_chrdev_open()t o avoid
> the above issues.
Applied patch 1 + 2 to 4.18/scsi-queue. Thank you.
--
Martin K. Petersen Oracle Linux Engineering
WARNING: multiple messages have this Message-ID (diff)
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Wenwen Wang <wang6495@umn.edu>
Cc: Kangjie Lu <kjlu@umn.edu>, Adam Radford <aradford@gmail.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH v2] scsi: 3w-9xxx: fix a missing-check bug
Date: Tue, 08 May 2018 01:34:10 -0400 [thread overview]
Message-ID: <yq1muxaww19.fsf@oracle.com> (raw)
In-Reply-To: <1525740413-23443-1-git-send-email-wang6495@umn.edu> (Wenwen Wang's message of "Mon, 7 May 2018 19:46:43 -0500")
Wenwen,
> In twa_chrdev_ioctl(), the ioctl driver command is firstly copied from the
> userspace pointer 'argp' and saved to the kernel object 'driver_command'.
> Then a security check is performed on the data buffer size indicated by
> 'driver_command', which is 'driver_command.buffer_length'. If the security
> check is passed, the entire ioctl command is copied again from the 'argp'
> pointer and saved to the kernel object 'tw_ioctl'. Then, various operations
> are performed on 'tw_ioctl' according to the 'cmd'. Given that the 'argp'
> pointer resides in userspace, a malicious userspace process can race to
> change the buffer size between the two copies. This way, the user can
> bypass the security check and inject invalid data buffer size. This can
> cause potential security issues in the following execution.
>
> This patch checks for capable(CAP_SYS_ADMIN) in twa_chrdev_open()t o avoid
> the above issues.
Applied patch 1 + 2 to 4.18/scsi-queue. Thank you.
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2018-05-08 5:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 0:46 [PATCH v2] scsi: 3w-9xxx: fix a missing-check bug Wenwen Wang
2018-05-08 0:46 ` Wenwen Wang
2018-05-08 1:42 ` adam radford
2018-05-08 5:34 ` Martin K. Petersen [this message]
2018-05-08 5:34 ` Martin K. Petersen
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=yq1muxaww19.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=aradford@gmail.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=wang6495@umn.edu \
/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.