diff options
author | Kees Cook <keescook@chromium.org> | 2021-06-21 21:07:10 +0200 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2021-09-25 17:20:47 +0200 |
commit | 3d0107a7fee40402f0a3a325604bcbbc47597b5a (patch) | |
tree | a9cec765a2459179657096962ae6cedeb88aca5f /drivers/macintosh | |
parent | Linux 5.15-rc2 (diff) | |
download | linux-3d0107a7fee40402f0a3a325604bcbbc47597b5a.tar.xz linux-3d0107a7fee40402f0a3a325604bcbbc47597b5a.zip |
scsi: ibmvscsi: Avoid multi-field memset() overflow by aiming at srp
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memset(), avoid intentionally writing across
neighboring fields.
Instead of writing beyond the end of evt_struct->iu.srp.cmd, target the
upper union (evt_struct->iu.srp) instead, as that's what is being wiped.
Cc: Tyrel Datwyler <tyreld@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/lkml/yq135rzp79c.fsf@ca-mkp.ca.oracle.com
Acked-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Link: https://lore.kernel.org/lkml/6eae8434-e9a7-aa74-628b-b515b3695359@linux.ibm.com
Diffstat (limited to 'drivers/macintosh')
0 files changed, 0 insertions, 0 deletions