]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit - drivers/s390/net/qeth_core_main.c
s390/qeth: sanitize strings in debug messages
authorJulian Wiedmann <jwi@linux.ibm.com>
Fri, 2 Nov 2018 18:04:08 +0000 (19:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Nov 2018 17:44:05 +0000 (10:44 -0700)
commite19e5be8b4cafa8b3f8b0cd1b1dfe20fa0145b83
treef2a8fdc8dad7f905403fd87053959a4d5de2130e
parent265ad0632fef0fac447894b26fcf91562fbb0e30
s390/qeth: sanitize strings in debug messages

As Documentation/s390/s390dbf.txt states quite clearly, using any
pointer in sprinf-formatted s390dbf debug entries is dangerous.
The pointers are dereferenced whenever the trace file is read from.
So if the referenced data has a shorter life-time than the trace file,
any read operation can result in a use-after-free.

So rip out all hazardous use of indirect data, and replace any usage of
dev_name() and such by the Bus ID number.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c