An error occurred fetching the project authors.
  1. 13 Mar, 2019 1 commit
    • YueHaibing's avatar
      net: nfc: Fix NULL dereference on nfc_llcp_build_tlv fails · 05d3d2d0
      YueHaibing authored
      [ Upstream commit 58bdd544 ]
      
      KASAN report this:
      
      BUG: KASAN: null-ptr-deref in nfc_llcp_build_gb+0x37f/0x540 [nfc]
      Read of size 3 at addr 0000000000000000 by task syz-executor.0/5401
      
      CPU: 0 PID: 5401 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0xfa/0x1ce lib/dump_stack.c:113
       kasan_report+0x171/0x18d mm/kasan/report.c:321
       memcpy+0x1f/0x50 mm/kasan/common.c:130
       nfc_llcp_build_gb+0x37f/0x540 [nfc]
       nfc_llcp_register_device+0x6eb/0xb50 [nfc]
       nfc_register_device+0x50/0x1d0 [nfc]
       nfcsim_device_new+0x394/0x67d [nfcsim]
       ? 0xffffffffc1080000
       nfcsim_init+0x6b/0x1000 [nfcsim]
       do_one_initcall+0xfa/0x5ca init/main.c:887
       do_init_module+0x204/0x5f6 kernel/module.c:3460
       load_module+0x66b2/0x8570 kernel/module.c:3808
       __do_sys_finit_module+0x238/0x2a0 kernel/module.c:3902
       do_syscall_64+0x147/0x600 arch/x86/entry/common.c:290
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      RIP: 0033:0x462e99
      Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
      RSP: 002b:00007f9cb79dcc58 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
      RAX: ffffffffffffffda RBX: 000000000073bf00 RCX: 0000000000462e99
      RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000003
      RBP: 00007f9cb79dcc70 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9cb79dd6bc
      R13: 00000000004bcefb R14: 00000000006f7030 R15: 0000000000000004
      
      nfc_llcp_build_tlv will return NULL on fails, caller should check it,
      otherwise will trigger a NULL dereference.
      Reported-by: default avatarHulk Robot <hulkci@huawei.com>
      Fixes: eda21f16 ("NFC: Set MIU and RW values from CONNECT and CC LLCP frames")
      Fixes: d646960f ("NFC: Initial LLCP support")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      05d3d2d0
  2. 22 Jul, 2018 1 commit
  3. 30 May, 2018 1 commit
  4. 06 Jul, 2016 2 commits
  5. 25 Feb, 2016 1 commit
  6. 02 Dec, 2014 1 commit
    • Christophe Ricard's avatar
      NFC: Fix warning "warning: incorrect type in assignment" · e5b53c0a
      Christophe Ricard authored
      Fix warnings:
      net/nfc/llcp_commands.c:421:14: warning: incorrect type in assignment (different base types)
      net/nfc/llcp_commands.c:421:14:    expected unsigned short [unsigned] [usertype] miux
      net/nfc/llcp_commands.c:421:14:    got restricted __be16
      net/nfc/llcp_commands.c:477:14: warning: incorrect type in assignment (different base types)
      net/nfc/llcp_commands.c:477:14:    expected unsigned short [unsigned] [usertype] miux
      net/nfc/llcp_commands.c:477:14:    got restricted __be16
      
      Procedure to reproduce:
      make ARCH=x86_64 allmodconfig
      make C=1 CF=-D__CHECK_ENDIAN__
      Signed-off-by: default avatarChristophe Ricard <christophe-h.ricard@st.com>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      e5b53c0a
  7. 24 Nov, 2014 1 commit
  8. 19 May, 2014 1 commit
  9. 04 Jan, 2014 2 commits
  10. 11 Dec, 2013 1 commit
  11. 14 Jun, 2013 1 commit
  12. 26 Apr, 2013 1 commit
  13. 11 Apr, 2013 3 commits
  14. 10 Mar, 2013 5 commits
  15. 09 Jan, 2013 1 commit
  16. 19 Nov, 2012 2 commits
  17. 28 Oct, 2012 1 commit
  18. 26 Oct, 2012 3 commits
  19. 27 Sep, 2012 1 commit
    • Thierry Escande's avatar
      NFC: LLCP raw socket support · 4463523b
      Thierry Escande authored
      This adds support for socket of type SOCK_RAW to LLCP.
      sk_buff are copied and sent to raw sockets with a 2 bytes extra header:
      The first byte header contains the nfc adapter index.
      The second one contains flags:
      - 0x01 - Direction (0=RX, 1=TX)
      - 0x02-0x80 - Reserved
      A raw socket has to be explicitly bound to a nfc adapter. This is achieved
      by specifying the adapter index to be bound to in the dev_idx field of the
      sockaddr_nfc_llcp struct passed to bind().
      Signed-off-by: default avatarThierry Escande <thierry.escande@linux.intel.com>
      Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
      4463523b
  20. 04 Jun, 2012 3 commits
  21. 16 May, 2012 1 commit
  22. 15 May, 2012 1 commit
  23. 12 Apr, 2012 3 commits
  24. 11 Apr, 2012 1 commit
  25. 06 Mar, 2012 1 commit