Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-dm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • 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
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • 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
  • linux-arm
  • linux-dm
  • Repository
  • linux-dm
  • drivers
  • net
  • phy
  • micrel.c
Find file BlameHistoryPermalink
  • Florian Fainelli's avatar
    net: phy: micrel: Use strlcpy() for ethtool::get_strings · 55f53567
    Florian Fainelli authored Mar 02, 2018
    Our statistics strings are allocated at initialization without being
    bound to a specific size, yet, we would copy ETH_GSTRING_LEN bytes using
    memcpy() which would create out of bounds accesses, this was flagged by
    KASAN. Replace this with strlcpy() to make sure we are bound the source
    buffer size and we also always NUL-terminate strings.
    
    Fixes: 2b2427d0
    
     ("phy: micrel: Add ethtool statistics counters")
    Signed-off-by: Florian Fainelli's avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    55f53567