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-next>] [day] [month] [year] [list]
Message-ID: <DUB128-W847EC851814161BB5A100A9C9C0@phx.gbl>
Date:	Mon, 13 Jul 2015 09:48:59 +0000
From:	David Binderman <dcb314@...mail.com>
To:	Giuseppe Cavallaro <peppe.cavallaro@...com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: linux-4.2-rc2/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1993:
 possible bad error checking ?

Hello there,

[linux-4.2-rc2/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c:1993]: (style) Checking if unsigned variable 'entry' is less than zero.

Source code is

        entry = priv->hw->mode->jumbo_frm(priv, skb, csum_insertion);
        if (unlikely(entry < 0))
            goto dma_map_err;

but

    unsigned int entry;

So the error checking from the function call looks broken to me.

If the return value from the function call to jumbo_frm is a plain signed integer, suggest
sanity check that *before* assigning into an unsigned integer.

Regards

David Binderman

 		 	   		  --
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