Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • drivers
  • platform
  • surface
  • surface_aggregator_cdev.c
Find file BlameHistoryPermalink
  • Maximilian Luz's avatar
    platform/surface: aggregator_cdev: Add comments regarding unchecked allocation size · e94a2650
    Maximilian Luz authored Jan 11, 2021
    
    
    CI static analysis complains about the allocation size in payload and
    response buffers being unchecked. In general, these allocations should
    be safe as the user-input is u16 and thus limited to U16_MAX, which is
    only slightly larger than the theoretical maximum imposed by the
    underlying SSH protocol.
    
    All bounds on these values required by the underlying protocol are
    enforced in ssam_request_sync() (or rather the functions called by it),
    thus bounds here are only relevant for allocation.
    
    Add comments explaining that this should be safe.
    
    Reported-by: default avatarColin Ian King <colin.king@canonical.com>
    Fixes: 178f6ab7
    
     ("platform/surface: Add Surface Aggregator user-space interface")
    Addresses-Coverity: ("Untrusted allocation size")
    Signed-off-by: default avatarMaximilian Luz <luzmaximilian@gmail.com>
    Link: https://lore.kernel.org/r/20210111154851.325404-3-luzmaximilian@gmail.com
    
    
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    e94a2650
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7