Received: by 10.223.164.202 with SMTP id h10csp961367wrb; Tue, 7 Nov 2017 18:32:33 -0800 (PST) X-Google-Smtp-Source: ABhQp+QzmrvSgqTVrdyCOvk/7z5M4cICzFyHBQF2PjTItwQLnIOaxz0oTe5hHapJDHUTfy5l5PdE X-Received: by 10.98.58.199 with SMTP id v68mr853606pfj.44.1510108353268; Tue, 07 Nov 2017 18:32:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510108353; cv=none; d=google.com; s=arc-20160816; b=TqpYKtQVDGkZ2ylTPrR2orVB5B/xnsRmdD/G+qJsxjfaOkaGDutVRU6+WMc7DGrTLA F5IjsFkU1goydSV9zARacV/s5GrrKVhHr/X8y4YreL0Bm2GFPngdBGXNIWaiimK0bzTL aX8dJPD/+LniGllXsIKbpB/GIZQCm8QJvxXfdRa/IQLQL61w9exKhTn4tk8cOZWU5MVQ MeoGuMowlOHVTYCnsGCnj+WOBxBQLBr61LC0533flRjGT5pHKKvA1roNhBSre3k2PoFQ yp6GsTa8D5ZOk/y+jXlQsbsx2bFMyFVG7WIgMHHVc8ECzhQ4w/no3ED9AmiCT2anxBYd TGNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-id:mime-version:user-agent :references:message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=r6DdcW/uvdFmziKGnyKMPN1IETYTQ++ECv3DnP7s1bI=; b=G/ijSf95YzRA8IQ7fGZ7ZSTLrKZCOiks1XwZfsOJ44z7jKsl06P/Axx5RZL9Y82CqQ kuJzONLbFQZxys2XHA1Z9eb4acv+6Z8XEIl0KAQ23UvWljmWYP5CXP2iTlq3cQ+G8kor gPJIEUvJLL7L2EH81HPxsr13AB5tJdKbJ4slr74EPOuljgpeTYlNN9RI9oqgPkXgwNZl uF4EGTIDbmjFZkl5Pr9SkFWbN34jmLeIXLTZoT27nEIo1l54OahP+4Q08G9Ndf0ln4t9 Q6JacXOA2oPQiiKlYhlLQg6QHG002NgFh6cucZtBBbhqQSSY59FHB6KwFHExArm3dIJs qf0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si2760044pfj.231.2017.11.07.18.32.20; Tue, 07 Nov 2017 18:32:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933001AbdKGTee (ORCPT + 90 others); Tue, 7 Nov 2017 14:34:34 -0500 Received: from resqmta-ch2-12v.sys.comcast.net ([69.252.207.44]:40252 "EHLO resqmta-ch2-12v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753919AbdKGTec (ORCPT ); Tue, 7 Nov 2017 14:34:32 -0500 Received: from resomta-ch2-03v.sys.comcast.net ([69.252.207.99]) by resqmta-ch2-12v.sys.comcast.net with ESMTP id C9cceEnlldu5rC9doemBH8; Tue, 07 Nov 2017 19:34:32 +0000 Received: from gentwo.org ([98.222.162.64]) by resomta-ch2-03v.sys.comcast.net with SMTP id C9dnejPva0v3OC9dnedBAB; Tue, 07 Nov 2017 19:34:31 +0000 Received: by gentwo.org (Postfix, from userid 1001) id D983011602C5; Tue, 7 Nov 2017 13:34:30 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id D4B0D1160140; Tue, 7 Nov 2017 13:34:30 -0600 (CST) Date: Tue, 7 Nov 2017 13:34:30 -0600 (CST) From: Christopher Lameter X-X-Sender: cl@nuc-kabylake To: syzbot cc: akpm@linux-foundation.org, Kees Cook , Joonsoo Kim , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Pekka Enberg , David Rientjes , syzkaller-bugs@googlegroups.com Subject: Re: WARNING in __check_heap_object In-Reply-To: <001a114096fec09301055d68d784@google.com> Message-ID: References: <001a114096fec09301055d68d784@google.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; FORMAT=flowed; DELSP=yes Content-ID: X-CMAE-Envelope: MS4wfAvSgWprUy5HQfyDRkUeiJH8WL5QcJB6RBPLVNO3ySj6u0eZDVYBOjqFBx97ip8crSyVbTm8EQlI/lRjjZrprx0K4OMb6/15leoF4KUholCbB5s7Kt6a bbsxXrZBY24HVfVkopz9dWru2LV8xlj3uVPPOGw5VHCQAgy5Fw5FrFmyK9skQGtOu2hL8BztRJNdJ6yDMacTOJXC5Ff6ThbYTPt0+b70j/DbMVHzAEvhWlxV jxhqBJojQ9Pih/AfUYFljOtXLDoiB2O4d2a5jJYDupBDnQvo9zJY7b/1pxHJ8PgdHZsSjL7Qy0YG7MJy/piXPUC7Bnr2NobSG/ku58Yjpe+T43/7K2lz0gQk dXXBQ4ZthkK15ErP8v8ssJDV5PGXeAyRLA3UbSDdmsBzNyXYHDmGR+TSZFUaLXIwxJtllGUmIYJOipPv20ruT433dUdAGBjEDNbcLrVNUbJxRk21SO4tVHPO 7i7gpp56hDgnCl7Ig/hG1Dx6JSU27CfqLG2T4Q== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Well that is a security thingamy related to CONFIG_HARDDENED_USERCOPY. Kees? ----- Offending function #ifdef CONFIG_HARDENED_USERCOPY /* * Rejects objects that are incorrectly sized. * * Returns NULL if check passes, otherwise const char * to name of cache * to indicate an error. */ const char *__check_heap_object(const void *ptr, unsigned long n, struct page *page) { struct kmem_cache *cachep; unsigned int objnr; unsigned long offset; /* Find and validate object. */ cachep = page->slab_cache; objnr = obj_to_index(cachep, page, (void *)ptr); BUG_ON(objnr >= cachep->num); /* Find offset within object. */ offset = ptr - index_to_obj(cachep, page, objnr) - obj_offset(cachep); /* Allow address range falling entirely within object size. */ if (offset <= cachep->object_size && n <= cachep->object_size - offset) return NULL; return cachep->name; } #endif /* CONFIG_HARDENED_USERCOPY */ On Tue, 7 Nov 2017, syzbot wrote: > Hello, > > syzkaller hit the following crash on 5a3517e009e979f21977d362212b7729c5165d92 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console output is attached. > C reproducer is attached > syzkaller reproducer is attached. See https://goo.gl/kgGztJ > for information about syzkaller reproducers > > > ------------[ cut here ]------------ > WARNING: CPU: 1 PID: 2994 at mm/slab.c:4434 __check_heap_object+0xbc/0xd0 > mm/slab.c:4433 > Kernel panic - not syncing: panic_on_warn set ... > > CPU: 1 PID: 2994 Comm: syzkaller408738 Not tainted 4.14.0-rc7-next-20171103+ > #38 > Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google > 01/01/2011 > Call Trace: > __dump_stack lib/dump_stack.c:17 [inline] > dump_stack+0x194/0x257 lib/dump_stack.c:53 > panic+0x1e4/0x41c kernel/panic.c:183 > __warn+0x1c4/0x1e0 kernel/panic.c:546 > report_bug+0x211/0x2d0 lib/bug.c:184 > fixup_bug+0x40/0x90 arch/x86/kernel/traps.c:177 > do_trap_no_signal arch/x86/kernel/traps.c:211 [inline] > do_trap+0x260/0x390 arch/x86/kernel/traps.c:260 > do_error_trap+0x120/0x390 arch/x86/kernel/traps.c:297 > do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:310 > invalid_op+0x18/0x20 arch/x86/entry/entry_64.S:906 > RIP: 0010:__check_heap_object+0xbc/0xd0 mm/slab.c:4433 > RSP: 0018:ffff8801ce0670d8 EFLAGS: 00010282 > RAX: 000000000000004a RBX: 0000000000000000 RCX: 0000000000000000 > RDX: 000000000000004a RSI: 1ffff10039c0cddb RDI: ffffed0039c0ce0f > RBP: ffff8801ce0670e0 R08: 0000000000000001 R09: 0000000000000000 > R10: ffff8801ceb0a500 R11: 0000000000000000 R12: ffffea00074a6c80 > R13: ffff8801d29b26b0 R14: 000000000000000b R15: ffffea00074a6c80 > check_heap_object mm/usercopy.c:222 [inline] > __check_object_size+0x22c/0x4f0 mm/usercopy.c:248 > check_object_size include/linux/thread_info.h:112 [inline] > check_copy_size include/linux/thread_info.h:143 [inline] > copy_to_user include/linux/uaccess.h:154 [inline] > sctp_getsockopt_events net/sctp/socket.c:4972 [inline] > sctp_getsockopt+0x2b90/0x70b0 net/sctp/socket.c:7012 > sock_common_getsockopt+0x95/0xd0 net/core/sock.c:2924 > SYSC_getsockopt net/socket.c:1882 [inline] > SyS_getsockopt+0x178/0x340 net/socket.c:1864 > entry_SYSCALL_64_fastpath+0x1f/0xbe > RIP: 0033:0x43fca9 > RSP: 002b:00007fff12a2dfa8 EFLAGS: 00000203 ORIG_RAX: 0000000000000037 > RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 000000000043fca9 > RDX: 000000000000000b RSI: 0000000000000084 RDI: 0000000000000003 > RBP: 0000000000000086 R08: 0000000020290000 R09: 0000000000000000 > R10: 000000002099aff5 R11: 0000000000000203 R12: 0000000000401610 > R13: 00000000004016a0 R14: 0000000000000000 R15: 0000000000000000 > Dumping ftrace buffer: > (ftrace buffer empty) > Kernel Offset: disabled > Rebooting in 86400 seconds.. > > > --- > This bug is generated by a dumb bot. It may contain errors. > See https://goo.gl/tpsmEJ for details. > Direct all questions to syzkaller@googlegroups.com. > Please credit me with: Reported-by: syzbot > > syzbot will keep track of this bug report. > Once a fix for this bug is committed, please reply to this email with: > #syz fix: exact-commit-title > To mark this as a duplicate of another syzbot report, please reply with: > #syz dup: exact-subject-of-another-report > If it's a one-off invalid bug report, please reply with: > #syz invalid > Note: if the crash happens again, it will cause creation of a new bug report. > Note: all commands must start from beginning of the line. From 1583463035656980277@xxx Wed Nov 08 02:27:08 +0000 2017 X-GM-THRID: 1583463035656980277 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread