Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  • Eric Dumazet's avatar
    crypto: af_alg - get rid of alg_memory_allocated · 25206111
    Eric Dumazet authored
    alg_memory_allocated does not seem to be really used.
    
    alg_proto does have a .memory_allocated field, but no
    corresponding .sysctl_mem.
    
    This means sk_has_account() returns true, but all sk_prot_mem_limits()
    users will trigger a NULL dereference [1].
    
    THis was not a problem until SO_RESERVE_MEM addition.
    
    general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
    KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
    CPU: 1 PID: 3591 Comm: syz-executor153 Not tainted 5.17.0-rc3-syzkaller-00316-gb81b1829e7e3 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
    RIP: 0010:sk_prot_mem_limits include/net/sock.h:1523 [inline]
    RIP: 0010:sock_reserve_memory+0x1d7/0x330 net/core/sock.c:1000
    Code: 08 00 74 08 48 89 ef e8 27 20 bb f9 4c 03 7c 24 10 48 8b 6d 00 48 83 c5 08 48 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 48 89 ef e8 fb 1f bb f...
    25206111