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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1498801985.24896.4.camel@haakon3.risingtidesystems.com>
Date:   Thu, 29 Jun 2017 22:53:05 -0700
From:   "Nicholas A. Bellinger" <nab@...ux-iscsi.org>
To:     Sagi Grimberg <sagi@...mberg.me>
Cc:     Andrea Righi <righi.andrea@...il.com>,
        Robert LeBlanc <robert@...lancnet.us>,
        Sean Jenkins <sean@...terservers.com>,
        Doug Ledford <dledford@...hat.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        linux-rdma <linux-rdma@...r.kernel.org>,
        target-devel <target-devel@...r.kernel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] ib_isert: prevent NULL pointer dereference in
 isert_login_recv_done()

On Thu, 2017-06-29 at 11:28 +0300, Sagi Grimberg wrote:
> >> Can you test just the one liner fix below?
> >>
> >>>> @@ -1452,7 +1452,7 @@
> >>>>   isert_login_recv_done(struct ib_cq *cq, struct ib_wc *wc)
> >>>>   {
> >>>>   	struct isert_conn *isert_conn = wc->qp->qp_context;
> >>>> -	struct ib_device *ib_dev = isert_conn->cm_id->device;
> >>>> +	struct ib_device *ib_dev = isert_conn->device->ib_device;
> >>>>   	if (unlikely(wc->status != IB_WC_SUCCESS)) {
> >>>>   		isert_print_wc(wc, "login recv");
> > 
> > I'll test also this one-liner fix as soon as I can.
> > 
> > But I can say that I'm pretty sure it will work as well, because all the
> > previous NULL pointer dereferences that we've got in the past happened
> > all 100% in isert_login_recv_done(). The other cases are probably a safe
> > precaution, but they can't really happen.
> 
> Agree, I'd prefer to start with a surgical fix before moving forward.

Sounds fine.  The single line fix above in isert_login_recv_done() has
been queued up in target-pending/for-next with Andrea's Tested-by and
your Reviewed-by:

https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git/commit/?h=for-next&id=702c0f17403765cc5aa1c18f6ea6eb549c1bac9b

Please let me know if there are any other issues wrt the surgical fix.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ