1. 03 2月, 2021 1 次提交
  2. 10 12月, 2020 1 次提交
    • L
      RDMA/cm: Fix an attempt to use non-valid pointer when cleaning timewait · 340b940e
      Leon Romanovsky 提交于
      If cm_create_timewait_info() fails, the timewait_info pointer will contain
      an error value and will be used in cm_remove_remote() later.
      
        general protection fault, probably for non-canonical address 0xdffffc0000000024: 0000 [#1] SMP KASAN PTI
        KASAN: null-ptr-deref in range [0×0000000000000120-0×0000000000000127]
        CPU: 2 PID: 12446 Comm: syz-executor.3 Not tainted 5.10.0-rc5-5d4c0742a60e #27
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
        RIP: 0010:cm_remove_remote.isra.0+0x24/0×170 drivers/infiniband/core/cm.c:978
        Code: 84 00 00 00 00 00 41 54 55 53 48 89 fb 48 8d ab 2d 01 00 00 e8 7d bf 4b fe 48 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <0f> b6 04 02 48 89 ea 83 e2 07 38 d0 7f 08 84 c0 0f 85 fc 00 00 00
        RSP: 0018:ffff888013127918 EFLAGS: 00010006
        RAX: dffffc0000000000 RBX: fffffffffffffff4 RCX: ffffc9000a18b000
        RDX: 0000000000000024 RSI: ffffffff82edc573 RDI: fffffffffffffff4
        RBP: 0000000000000121 R08: 0000000000000001 R09: ffffed1002624f1d
        R10: 0000000000000003 R11: ffffed1002624f1c R12: ffff888107760c70
        R13: ffff888107760c40 R14: fffffffffffffff4 R15: ffff888107760c9c
        FS:  00007fe1ffcc1700(0000) GS:ffff88811a600000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000001b2ff21000 CR3: 000000010f504001 CR4: 0000000000370ee0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
         cm_destroy_id+0x189/0×15b0 drivers/infiniband/core/cm.c:1155
         cma_connect_ib drivers/infiniband/core/cma.c:4029 [inline]
         rdma_connect_locked+0x1100/0×17c0 drivers/infiniband/core/cma.c:4107
         rdma_connect+0x2a/0×40 drivers/infiniband/core/cma.c:4140
         ucma_connect+0x277/0×340 drivers/infiniband/core/ucma.c:1069
         ucma_write+0x236/0×2f0 drivers/infiniband/core/ucma.c:1724
         vfs_write+0x220/0×830 fs/read_write.c:603
         ksys_write+0x1df/0×240 fs/read_write.c:658
         do_syscall_64+0x33/0×40 arch/x86/entry/common.c:46
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
      
      Fixes: a977049d ("[PATCH] IB: Add the kernel CM implementation")
      Link: https://lore.kernel.org/r/20201204064205.145795-1-leon@kernel.orgReviewed-by: NMaor Gottlieb <maorg@nvidia.com>
      Reported-by: NAmit Matityahu <mitm@nvidia.com>
      Signed-off-by: NLeon Romanovsky <leonro@nvidia.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      340b940e
  3. 08 12月, 2020 1 次提交
  4. 13 11月, 2020 1 次提交
  5. 31 10月, 2020 1 次提交
  6. 25 8月, 2020 2 次提交
  7. 24 8月, 2020 1 次提交
  8. 19 8月, 2020 1 次提交
  9. 16 7月, 2020 1 次提交
    • M
      RDMA/cm: Protect access to remote_sidr_table · 87c4c774
      Maor Gottlieb 提交于
      cm.lock must be held while accessing remote_sidr_table. This fixes the
      below NULL pointer dereference.
      
        BUG: kernel NULL pointer dereference, address: 0000000000000000
        #PF: supervisor write access in kernel mode
        #PF: error_code(0x0002) - not-present page
        PGD 0 P4D 0
        Oops: 0002 [#1] SMP PTI
        CPU: 2 PID: 7288 Comm: udaddy Not tainted 5.7.0_for_upstream_perf_2020_06_09_15_14_20_38 #1
        Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
        RIP: 0010:rb_erase+0x10d/0x360
        Code: 00 00 00 48 89 c1 48 89 d0 48 8b 50 08 48 39 ca 74 48 f6 02 01 75 af 48 8b 7a 10 48 89 c1 48 83 c9 01 48 89 78 08 48 89 42 10 <48> 89 0f 48 8b 08 48 89 0a 48 83 e1 fc 48 89 10 0f 84 b1 00 00 00
        RSP: 0018:ffffc90000f77c30 EFLAGS: 00010086
        RAX: ffff8883df27d458 RBX: ffff8883df27da58 RCX: ffff8883df27d459
        RDX: ffff8883d183fa58 RSI: ffffffffa01e8d00 RDI: 0000000000000000
        RBP: ffff8883d62ac800 R08: 0000000000000000 R09: 00000000000000ce
        R10: 000000000000000a R11: 0000000000000000 R12: ffff8883df27da00
        R13: ffffc90000f77c98 R14: 0000000000000130 R15: 0000000000000000
        FS:  00007f009f877740(0000) GS:ffff8883f1a00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 0000000000000000 CR3: 00000003d467e003 CR4: 0000000000160ee0
        Call Trace:
         cm_send_sidr_rep_locked+0x15a/0x1a0 [ib_cm]
         ib_send_cm_sidr_rep+0x2b/0x50 [ib_cm]
         cma_send_sidr_rep+0x8b/0xe0 [rdma_cm]
         __rdma_accept+0x21d/0x2b0 [rdma_cm]
         ? ucma_get_ctx+0x2b/0xe0 [rdma_ucm]
         ? _copy_from_user+0x30/0x60
         ucma_accept+0x13e/0x1e0 [rdma_ucm]
         ucma_write+0xb4/0x130 [rdma_ucm]
         vfs_write+0xad/0x1a0
         ksys_write+0x9d/0xb0
         do_syscall_64+0x48/0x130
         entry_SYSCALL_64_after_hwframe+0x44/0xa9
        RIP: 0033:0x7f009ef60924
        Code: 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 80 00 00 00 00 8b 05 2a ef 2c 00 48 63 ff 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 f3 c3 66 90 55 53 48 89 d5 48 89 f3 48 83
        RSP: 002b:00007fff843edf38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
        RAX: ffffffffffffffda RBX: 000055743042e1d0 RCX: 00007f009ef60924
        RDX: 0000000000000130 RSI: 00007fff843edf40 RDI: 0000000000000003
        RBP: 00007fff843ee0e0 R08: 0000000000000000 R09: 0000557430433090
        R10: 0000000000000001 R11: 0000000000000246 R12: 0000000000000000
        R13: 00007fff843edf40 R14: 000000000000038c R15: 00000000ffffff00
        CR2: 0000000000000000
      
      Fixes: 6a8824a7 ("RDMA/cm: Allow ib_send_cm_sidr_rep() to be done under lock")
      Link: https://lore.kernel.org/r/20200716105519.1424266-1-leon@kernel.orgSigned-off-by: NMaor Gottlieb <maorg@mellanox.com>
      Signed-off-by: NLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
      87c4c774
  10. 18 6月, 2020 1 次提交
  11. 04 6月, 2020 1 次提交
  12. 28 5月, 2020 1 次提交
  13. 13 5月, 2020 9 次提交
  14. 06 5月, 2020 1 次提交
  15. 15 4月, 2020 2 次提交
  16. 18 3月, 2020 15 次提交