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  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]
Date:	Tue, 24 Jun 2014 15:48:32 +0800
From:	Lai Jiangshan <>
To:	Andrey Ryabinin <>
CC:	Andrew Morton <>,
	Tejun Heo <>, <>,
	<>, <>, <>,
	<>, <>
Subject: Re: [PATCH] lib: idr: fix out-of-bounds pointer dereference

326cf0f0f308 ("idr: fix top layer handling") enlarged the pa array.
But the additional "+1" space is only used in id-allocation, it is free
in other usage, (paa may point to the additional "+1" space, but not dereference it).
so you can reuse it.

In the 3 functions your patch touched:
-	struct idr_layer ***paa = &pa[0];
+	struct idr_layer ***paa = &pa[1];

I don't reject your patch, I had review it.

Reviewed-by: Lai Jiangshan <>

The reason why I'm still muttering here is that I wish a simple solution
to fix the problem. And:
1) your patch also makes use of the additional "+1" @pa space: *++paa = p
2) your patch may slight enlarge the function body.
3) I think you patch reduces the readability a little although the idr code
   itself is already shit.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists