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
  • linux
  • include
  • linux
  • tnum.h
Find file BlameHistoryPermalink
  • Shung-Hsi Yu's avatar
    bpf, tnums: Warn against the usage of tnum_in(tnum_range(), ...) · dc84dbbc
    Shung-Hsi Yu authored Aug 31, 2022
    Commit a657182a
    
     ("bpf: Don't use tnum_range on array range checking
    for poke descriptors") has shown that using tnum_range() as argument to
    tnum_in() can lead to misleading code that looks like tight bound check
    when in fact the actual allowed range is much wider.
    
    Document such behavior to warn against its usage in general, and suggest
    some scenario where result can be trusted.
    
    Signed-off-by: default avatarShung-Hsi Yu <shung-hsi.yu@suse.com>
    Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
    Link: https://lore.kernel.org/bpf/984b37f9fdf7ac36831d2137415a4a915744c1b6.1661462653.git.daniel@iogearbox.net
    Link: https://www.openwall.com/lists/oss-security/2022/08/26/1
    Link: https://lore.kernel.org/bpf/20220831031907.16133-3-shung-hsi.yu@suse.com
    Link: https://lore.kernel.org/bpf/20220831031907.16133-2-shung-hsi.yu@suse.com
    dc84dbbc
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7