Commit c97d5d87 authored by Yihui ZENG's avatar Yihui ZENG Committed by Ben Hutchings
Browse files

s390/cmm: fix information leak in cmm_timeout_handler()



commit b8e51a6a upstream.

The problem is that we were putting the NUL terminator too far:

	buf[sizeof(buf) - 1] = '\0';

If the user input isn't NUL terminated and they haven't initialized the
whole buffer then it leads to an info leak.  The NUL terminator should
be:

	buf[len - 1] = '\0';

Signed-off-by: default avatarYihui Zeng <yzeng56@asu.edu>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
[heiko.carstens@de.ibm.com: keep semantics of how *lenp and *ppos are handled]
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 55bdc8a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment