lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <57cb0385-209e-4cb0-b34c-281e5f99a3d9@gmail.com>
Date: Thu, 24 Oct 2024 09:02:00 +0800
From: Tuo Li <islituo@...il.com>
To: sagi@...mberg.me, jgg@...pe.ca, leon@...nel.org
Cc: linux-rdma@...r.kernel.org, target-devel@...r.kernel.org,
 linux-kernel@...r.kernel.org, baijiaju1990@...il.com
Subject: [BUG] IB/isert: Possible null-pointer dereference related

Hello,

Our static analysis tool has identified a potential null-pointer
dereference related to the wait-completion synchronization mechanism in
ibsert.c.

Consider the following execution scenario:

  isert_login_recv_done()  //1375
    if (isert_conn->conn)  //1390
    complete(&isert_conn->login_req_comp);  //1398

The variable isert_conn->conn is checked by an if statement at Line 1390,
which indicates that isert_conn->conn can be NULL. Then, complete() is
called at Line 1398 which will wake up the wait_for_completion_xxx().

Consider the following wait_for_completion_interruptible().

  isert_get_login_rx()  //2336
    wait_for_completion_interruptible(&isert_conn->login_req_comp); //2342
    isert_rx_login_req(isert_conn);  //2359
      conn = isert_conn->conn;       //981
      login = conn->conn_login;      //982

The value of isert_conn->conn is assigned to conn at Line 981, and then
dereferenced through conn->conn_login at Line 982. However, the variable
isert_conn->conn is checked at Line 1390, which means it can be NULL. If
so, a null-pointer dereference can occur at Line 982.

I am not quite sure whether this possible null-pointer dereference is real
and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Best wishes,
Tuo Li

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ