Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-rt
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • David Runge
  • linux-rt
  • Repository

Switch branch/tag
  • linux-rt
  • drivers
  • hid
  • usbhid
  • hid-core.c
Find file BlameHistoryPermalink
  • Alan Stern's avatar
    HID: usbhid: Fix warning caused by 0-length input reports · 9260f15e
    Alan Stern authored Sep 01, 2021
    commit 0a824efd
    
     upstream.
    
    Syzbot found a warning caused by hid_submit_ctrl() submitting a
    control request to transfer a 0-length input report:
    
    	usb 1-1: BOGUS control dir, pipe 80000280 doesn't match bRequestType a1
    
    (The warning message is a little difficult to understand.  It means
    that the control request claims to be for an IN transfer but this
    contradicts the USB spec, which requires 0-length control transfers
    always to be in the OUT direction.)
    
    Now, a zero-length report isn't good for anything and there's no
    reason for a device to have one, but the fuzzer likes to pick out
    these weird edge cases.  In the future, perhaps we will decide to
    reject 0-length reports at probe time.  For now, the simplest approach
    for avoiding these warnings is to pretend that the report actually has
    length 1.
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Reported-and-tested-by: syzbot+9b57a46bf1801ce2a2ca@syzkaller.appspotmail.com
    Tested-by: default avatarOleksandr Natalenko <oleksandr@natalenko.name>
    Tested-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
    Acked-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    9260f15e

Replace hid-core.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.