Skip to content
  1. Mar 30, 2019
  2. Mar 29, 2019
  3. Mar 28, 2019
  4. Mar 27, 2019
  5. Mar 26, 2019
    • Leon Romanovsky's avatar
      RDMA/rxe: Fix slab-out-bounds access which lead to kernel crash later · a4b7013d
      Leon Romanovsky authored
      BUG: KASAN: slab-out-of-bounds in rxe_mem_init_user+0x6c1/0x740 [rdma_rxe]
      Read of size 8 at addr ffff88805c01a608 by task ib_send_bw/573
      
      CPU: 24 PID: 573 Comm: ib_send_bw Not tainted 5.0.0-rc5+ #189
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.11.0-0-g63451fca13-prebuilt.qemu-project.org 04/01/2014
      Call Trace:
       rxe_mem_init_user+0x6c1/0x740 [rdma_rxe]
       rxe_reg_user_mr+0x9b/0x110 [rdma_rxe]
       ib_uverbs_reg_mr+0x428/0x9c0 [ib_uverbs]
       ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2b0/0x410 [ib_uverbs]
       ib_uverbs_run_method+0x79c/0x1da0 [ib_uverbs]
       rxe_mem_init_user+0x6c1/0x740 [rdma_rxe]
       rxe_reg_user_mr+0x9b/0x110 [rdma_rxe]
       ib_uverbs_reg_mr+0x428/0x9c0 [ib_uverbs]
       ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2b0/0x410 [ib_uverbs]
       ib_uverbs_run_method+0x79c/0x1da0 [ib_uverbs]
       ib_uverbs_cmd_verbs+0x5f2/0xf20 [ib_uverbs]
       ib_uverbs_ioctl+0x202/0x310 [ib_uverbs]
       do_vfs_ioctl+0x193/0x1440
       ksys_ioctl+0x3a/0x70
       __x64_sys_ioctl+0x6f/0xb0
       do_syscall_64+0x13f/0x570
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Allocated by task 573:
       __kasan_kmalloc.constprop.5+0xc1/0xd0
       __kmalloc+0x161/0x310
       rxe_mem_alloc+0x52/0x470 [rdma_rxe]
       rxe_mem_init_user+0x113/0x740 [rdma_rxe]
       rxe_reg_user_mr+0x9b/0x110 [rdma_rxe]
       ib_uverbs_reg_mr+0x428/0x9c0 [ib_uverbs]
       ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0x2b0/0x410 [ib_uverbs]
       ib_uverbs_run_method+0x79c/0x1da0 [ib_uverbs]
       ib_uverbs_cmd_verbs+0x5f2/0xf20 [ib_uverbs]
       ib_uverbs_ioctl+0x202/0x310 [ib_uverbs]
       do_vfs_ioctl+0x193/0x1440
       ksys_ioctl+0x3a/0x70
       __x64_sys_ioctl+0x6f/0xb0
       do_syscall_64+0x13f/0x570
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Freed by task 0:
       __kasan_slab_free+0x12e/0x180
       kfree+0x10a/0x2c0
       rcu_process_callbacks+0xa77/0x1260
       __do_softirq+0x2ad/0xacb
      
      Test scenario:
       ib_send_bw -x 1 -d rxe0 -a &
       ib_send_bw -x 1 -d rxe0 -a localhost
      
      Fixes: 8700e3e7
      
       ("Soft RoCE driver")
      Reported-by: default avatarParav Pandit <parav@mellanox.com>
      Reviewed-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Tested-by: default avatarZhu Yanjun <yanjun.zhu@oracle.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a4b7013d
    • Enrico Weigelt, metux IT consult's avatar
      drivers: infiniband: Fix whitespace in kconfig · 1a2e1583
      Enrico Weigelt, metux IT consult authored
      
      
      Adjust the kconfig whitespace in bnxt_re/iser to match the kernel
      standard.
      
      Signed-off-by: default avatarEnrico Weigelt, metux IT consult <info@metux.net>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      1a2e1583
    • Colin Ian King's avatar
      RDMA/nes: remove redundant check on udata · a6a9274a
      Colin Ian King authored
      The non-null check on udata is redundant as this check was performed just
      a few statements earlier and the check is always true as udata must be
      non-null at this point. Remove redundant the check on udata and the
      redundant else part that can never be executed.
      
      Detected by CoverityScan, CID#1477317 ("Logically dead code")
      
      Fixes: 89944450
      
       ("IB/{hw,sw}: Remove 'uobject->context' dependency in object creation APIs")
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      a6a9274a