summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-07-02 23:56:07 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-07-02 23:56:07 -0700
commitd8c2c85fcdf401331649be84777a5f9e42cd2b9f (patch)
tree6d50b74b49ad8184ee7ca264538524815394cb15
parent0dc1009129bdb74447b3d36524ff6254cc2a41cd (diff)
parent5539367290c83768be0235c2acc644e82606c117 (diff)
Merge "net: sockev: fix uninitialized data leak into userspace"
-rw-r--r--net/core/sockev_nlmcast.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/sockev_nlmcast.c b/net/core/sockev_nlmcast.c
index 749ffb81c87c..3d7dabef6410 100644
--- a/net/core/sockev_nlmcast.c
+++ b/net/core/sockev_nlmcast.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015, 2018 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -36,6 +36,8 @@ static struct netlink_kernel_cfg nlcfg = {
static void _sockev_event(unsigned long event, __u8 *evstr, int buflen)
{
+ memset(evstr, 0, buflen);
+
switch (event) {
case SOCKEV_SOCKET:
strlcpy(evstr, "SOCKEV_SOCKET", buflen);