Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ipipe-x86
  • Project information
    • Project information
    • Activity
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • xenomai
  • ipipe-x86
  • Repository

Switch branch/tag
  • ipipe-x86
  • drivers
  • platform
  • chrome
  • cros_ec_dev.c
Find file BlameHistoryPermalink
  • Dan Carpenter's avatar
    platform/chrome: cros_ec_dev - double fetch bug in ioctl · 096cdc6f
    Dan Carpenter authored Jun 21, 2016
    
    
    We verify "u_cmd.outsize" and "u_cmd.insize" but we need to make sure
    that those values have not changed between the two copy_from_user()
    calls.  Otherwise it could lead to a buffer overflow.
    
    Additionally, cros_ec_cmd_xfer() can set s_cmd->insize to a lower value.
    We should use the new smaller value so we don't copy too much data to
    the user.
    Reported-by: default avatarPengfei Wang <wpengfeinudt@gmail.com>
    Fixes: a8411784
    
     ('mfd: cros_ec: Use a zero-length array for command data')
    Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: default avatarKees Cook <keescook@chromium.org>
    Tested-by: default avatarGwendal Grignou <gwendal@chromium.org>
    Cc: <stable@vger.kernel.org> # v4.2+
    Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
    096cdc6f

Replace cros_ec_dev.c

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.

Imprint & Privacy Policy