aboutsummaryrefslogtreecommitdiff
path: root/kernel/ethosu_network.c
diff options
context:
space:
mode:
authorMikael Olsson <mikael.olsson@arm.com>2023-08-24 13:28:19 +0200
committerMikael Olsson <mikael.olsson@arm.com>2023-09-07 10:42:29 +0200
commitec90223ed8fd3c7e08791b62aaecf6d8b84a7230 (patch)
tree3d83b757171773d3416616821b8d28e335bc5c95 /kernel/ethosu_network.c
parent52c563d3928077c7e50fd121162709facf20214b (diff)
downloadethos-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_network.c')
-rw-r--r--kernel/ethosu_network.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ethosu_network.c b/kernel/ethosu_network.c
index 71ae484..dc641c5 100644
--- a/kernel/ethosu_network.c
+++ b/kernel/ethosu_network.c
@@ -111,7 +111,7 @@ static long ethosu_network_ioctl(struct file *file,
switch (cmd) {
case ETHOSU_IOCTL_NETWORK_INFO: {
- struct ethosu_uapi_network_info uapi;
+ struct ethosu_uapi_network_info uapi = { 0 };
dev_info(dev, "Network ioctl: Network info. net=0x%pK\n", net);