Subject: [merged] mm-nommuc-add-additional-check-for-vread-just-like-vwrite-has-done.patch removed from -mm tree To: gang.chen@xxxxxxxxxxx,riel@xxxxxxxxxx,viro@xxxxxxxxxxxxxxxxxx,walken@xxxxxxxxxx,mm-commits@xxxxxxxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 08 Jul 2013 12:25:46 -0700 The patch titled Subject: mm/nommu.c: add additional check for vread() just like vwrite() has done has been removed from the -mm tree. Its filename was mm-nommuc-add-additional-check-for-vread-just-like-vwrite-has-done.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Chen Gang <gang.chen@xxxxxxxxxxx> Subject: mm/nommu.c: add additional check for vread() just like vwrite() has done vwrite() checks for overflow. vread() should do the same thing. Since vwrite() checks the source buffer address, vread() should check the destination buffer address. Signed-off-by: Chen Gang <gang.chen@xxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Michel Lespinasse <walken@xxxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/nommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN mm/nommu.c~mm-nommuc-add-additional-check-for-vread-just-like-vwrite-has-done mm/nommu.c --- a/mm/nommu.c~mm-nommuc-add-additional-check-for-vread-just-like-vwrite-has-done +++ a/mm/nommu.c @@ -282,6 +282,10 @@ EXPORT_SYMBOL(vmalloc_to_pfn); long vread(char *buf, char *addr, unsigned long count) { + /* Don't allow overflow */ + if ((unsigned long) buf + count < count) + count = -(unsigned long) buf; + memcpy(buf, addr, count); return count; } _ Patches currently in -mm which might be from gang.chen@xxxxxxxxxxx are origin.patch linux-next.patch kernel-auditfilterc-fix-leak-in-audit_add_rule-error-path.patch include-linux-interrupth-add-dummy-irq_set_irq_wake-for-generic_hardirqs.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html