Re: [PATCH] SGI UV: uv_ptc_proc_write security hole

From: Ingo Molnar
Date: Mon Jun 23 2008 - 17:13:54 EST



* Cliff Wickman <cpw@xxxxxxx> wrote:

> From: Cliff Wickman <cpw@xxxxxxx>
>
> Someone could write 0 bytes to /proc/sgi_uv/ptc_statistics,
> causing
> optstr[count - 1] = '\0';
> to write to who-knows-where.
>
> (Andi Kleen noticed this need from a patch I sent for
> similar code in the ia64 world (sn2_ptc_proc_write()).)
>
> (count less than zero is not possible here, as count is unsigned)
>
> Diffed against 2.6.26-rc6

applied to tip/x86/uv - thanks Cliff.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/