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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070621123414.GL18863@kernel.dk>
Date:	Thu, 21 Jun 2007 14:34:16 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	pradeep singh <pradeep.rautela@...il.com>
Cc:	trivial@...nel.org, jgarzik@...ox.com, akpm@...ux-foundation.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH v2.6.22-rc5] cxgb2: handle possible NULL pointer dereferencing

On Thu, Jun 21 2007, pradeep singh wrote:
> Hi
> On 6/21/07, Jens Axboe <jens.axboe@...cle.com> wrote:
> >On Thu, Jun 21 2007, pradeep singh wrote:
> >> Hi,
> >>
> >> Chelsio's in kernel 10G driver does not checks the return value from
> >> t1_get_board_info() in cxgb2.c.
> >> t1_get_board_info may return a NULL and we still go on to dereference
> >> it in the for loop without checking for the NULL.
> >>
> >> This patch fixes this.
> >
> >Patch looks odd - bi is dereferenced a number of times after that loop
> >anyway, so I don't see your patch fixing much.
> Thanks for pointing that out Jens.
> Sorry, i pushed it in a haste :(.
> Will check again and resubmit it.

You're welcome. The first thing to do is analyze whether a NULL return
from t1_get_board_info() makes any sense. From a quick look, driver_data
should be the index into the t1 pci table. So if t1_get_board_info()
returns NULL, it must be some core bug. So I'd say either don't handle
it, or mark it with BUG_ON(), or do the !bi check and CH_ERR() a warning
and goto out_disable_pdev.

-- 
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ