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: <20170519212848.xba4nc2zvr5xcjxg@mwanda>
Date:   Sat, 20 May 2017 00:28:48 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     "Ed L. Cashin" <ed.cashin@....org>
Cc:     linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [PATCH] aoe: harmless underflow in minor_get_static()

The "aoemin" comes from revalidate() in drivers/block/aoe/aoechr.c.  It
can be negative.  We cap the upper bound but not the lower bound so
that's an underflow bug.  But it doesn't matter because we check "n"
against N_DEVS so it all works out fine in the end.

Anyway, let's silence the static checker warning.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index ffd1947500c6..eddd0ecc9e0b 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -58,7 +58,7 @@ minor_get_dyn(ulong *sysminor)
 }
 
 static int
-minor_get_static(ulong *sysminor, ulong aoemaj, int aoemin)
+minor_get_static(ulong *sysminor, ulong aoemaj, unsigned int aoemin)
 {
 	ulong flags;
 	ulong n;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ