Thread (14 messages) flat view 14 messages, 3 authors, 2004-02-14

Re: some bluetooth fixes

From: Andi Kleen <hidden>
Date: 2004-02-11 19:55:01

On Wed, 11 Feb 2004 19:55:43 +0100
Marcel Holtmann [off-list ref] wrote:
Hi Andi,
quoted
Doing size checks after the multiply is too late - they could
have already overflowed. You have to check the raw value from the user.
new patch is attached.

+	if (req.conn_num * sizeof(*ci) > PAGE_SIZE * 2)
+		return -EINVAL;

This can still overflow. It should be 

	if (req.conn_num > (PAGE_SIZE * 2)/sizeof(*ci))
		return -EINVAL

-Andi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help