summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-03-24 09:05:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2023-03-24 09:05:25 -0700
commit4bae0ad148f41904dd4e5857bdc2e3e31b950b3d (patch)
tree5cb9c3cb8b9b138ca7090f9ba9960699760ac17a
parented1407e7f7f906aed5afa851b0f409740c4bfea8 (diff)
parentb20cf3f89c56b5f6a38b7f76a8128bf9f291bbd3 (diff)
Merge tag 'tag-chrome-platform-fixes-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
Pull chrome platform fix from Tzung-Bi Shih: "Fix a kernel data leak vulnerability" * tag 'tag-chrome-platform-fixes-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_chardev: fix kernel data leak from ioctl
-rw-r--r--drivers/platform/chrome/cros_ec_chardev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/chrome/cros_ec_chardev.c b/drivers/platform/chrome/cros_ec_chardev.c
index 0de7c255254e..d6de5a294128 100644
--- a/drivers/platform/chrome/cros_ec_chardev.c
+++ b/drivers/platform/chrome/cros_ec_chardev.c
@@ -284,7 +284,7 @@ static long cros_ec_chardev_ioctl_xcmd(struct cros_ec_dev *ec, void __user *arg)
u_cmd.insize > EC_MAX_MSG_BYTES)
return -EINVAL;
- s_cmd = kmalloc(sizeof(*s_cmd) + max(u_cmd.outsize, u_cmd.insize),
+ s_cmd = kzalloc(sizeof(*s_cmd) + max(u_cmd.outsize, u_cmd.insize),
GFP_KERNEL);
if (!s_cmd)
return -ENOMEM;