diff options
author | Mikael Olsson <mikael.olsson@arm.com> | 2023-08-24 13:28:19 +0200 |
---|---|---|
committer | Mikael Olsson <mikael.olsson@arm.com> | 2023-09-07 10:42:29 +0200 |
commit | ec90223ed8fd3c7e08791b62aaecf6d8b84a7230 (patch) | |
tree | 3d83b757171773d3416616821b8d28e335bc5c95 /kernel/ethosu_buffer.c | |
parent | 52c563d3928077c7e50fd121162709facf20214b (diff) | |
download | ethos-u-linux-driver-stack-ec90223ed8fd3c7e08791b62aaecf6d8b84a7230.tar.gz |
Initialize UAPI structs copied to user space
To not leak any information from kernel space when IOCTL calls copy data
from kernel space to user space, the source struct in the IOCTL calls is
now initialized.
Change-Id: I0825e82ccdb51ced747e160dd7385fa1ed227eaf
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'kernel/ethosu_buffer.c')
-rw-r--r-- | kernel/ethosu_buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ethosu_buffer.c b/kernel/ethosu_buffer.c index e9575e7..7a49b39 100644 --- a/kernel/ethosu_buffer.c +++ b/kernel/ethosu_buffer.c @@ -147,7 +147,7 @@ static long ethosu_buffer_ioctl(struct file *file, break; } case ETHOSU_IOCTL_BUFFER_GET: { - struct ethosu_uapi_buffer uapi; + struct ethosu_uapi_buffer uapi = { 0 }; uapi.size = buf->size; uapi.offset = buf->offset; |