Re: [PATCH] fs/proc/: fix input sanity check.

From: David Rientjes
Date: Wed Aug 12 2009 - 15:17:18 EST


On Wed, 12 Aug 2009, Vincent Li wrote:

> I re-read the clear_refs_write() in fs/proc/task_mmu.c, If I understand it
> correctly, The old code takes non-zero string
> from userspace and convert it to unsigned long interger value. for

strict_strtol() converts to long.

> example,It accepts:
>
> echo 1 > /proc/pid/clear_refs
> echo 12foo > /proc/pid/clear_refs
>

http://userweb.kernel.org/~akpm/mmotm/broken-out/pagemap-clear_refs-modify-to-specify-anon-or-mapped-vma-clearing.patch
changes that, so you'll need to rebase on mmotm.
--
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/