Received: by 10.223.176.5 with SMTP id f5csp2366686wra; Sun, 28 Jan 2018 19:01:01 -0800 (PST) X-Google-Smtp-Source: AH8x226N7DjTQx/PnyyKaHPOGS2mIxeywWk4EsixBqtbO5qdCBBgpiOhH/JqqchcCiMuniHlD/jQ X-Received: by 10.98.76.87 with SMTP id z84mr25631680pfa.208.1517194861042; Sun, 28 Jan 2018 19:01:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517194860; cv=none; d=google.com; s=arc-20160816; b=r5k/Y3++9U2Ebf1C8o5ddv7ugBErSp6694uPKcLJF3teFyC5DjXPskWf88moNrfRag wzb3hGnGMnKxurW/4lMqbQJziwISXg0BaaK2V9cgr0oCYEZnXRWP4Pn+f3JXONP2GdBZ zdt6nWf25pntduljKeIQoaaQPuFaH6RU24GpLuAZ/lhfWknUF2WzmEidhxkZBoggZ1r1 /CLhuTewqiq0zP/+2MIflu3na8d/KGyaz3v2E+/HQ5+5oufF+ybWI+szmDQa8nh3Vk2R VF7i//zQbd1sslS/3hFVQOKKxSzYWt2CvCrBuXe5pWm/knWCm9GHLvlmzRSrhbjJDnqf BSUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :references:date:mime-version:cc:to:from:subject:message-id :arc-authentication-results; bh=fqJ8Mg7yNKRoh3wqAd8joqS8fLRdEHvc2NYFXyuXUIk=; b=n7MRd15c9Zcb9qUmT8joDDBS18NZZoiK6ZyxY8e82BTSsNS51MksyYWWSuktdogDZK YDzdyk2h2OlIbKTZye9oHZZDM4Reofk3T1XVCig9mNUFYFWNYEjEF2gft9BbPSGmFk02 5Zbp51UQrf5uq4FJX0kPAfCKUu4wwrg0B8OywhpVbWbGX+nsIt0IBE6R0fnt1s5csos6 BlRwBNXUchN74mFXAzl+it0t7p7lzbCUj+SHVfZalynZDI5/0qk5Or+aIKhRZvRRU0UB iWi2S4XH7ENZQqvCCGSzcOC3p9VwPI/ZU+V5+U8zwQdJUEVrxjhDjKcfeEJ86knuBbuq //1A== 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 v85si6553667pgb.353.2018.01.28.19.00.46; Sun, 28 Jan 2018 19:01:00 -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 S1753550AbeA2AUX (ORCPT + 99 others); Sun, 28 Jan 2018 19:20:23 -0500 Received: from www262.sakura.ne.jp ([202.181.97.72]:45652 "EHLO www262.sakura.ne.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901AbeA2AUW (ORCPT ); Sun, 28 Jan 2018 19:20:22 -0500 Received: from fsav102.sakura.ne.jp (fsav102.sakura.ne.jp [27.133.134.229]) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id w0T0KK3T015943; Mon, 29 Jan 2018 09:20:20 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav102.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav102.sakura.ne.jp); Mon, 29 Jan 2018 09:20:20 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav102.sakura.ne.jp) Received: from www262.sakura.ne.jp (localhost [127.0.0.1]) by www262.sakura.ne.jp (8.14.5/8.14.5) with ESMTP id w0T0KKSm015939; Mon, 29 Jan 2018 09:20:20 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Received: (from i-love@localhost) by www262.sakura.ne.jp (8.14.5/8.14.5/Submit) id w0T0KK8V015938; Mon, 29 Jan 2018 09:20:20 +0900 (JST) (envelope-from penguin-kernel@i-love.sakura.ne.jp) Message-Id: <201801290020.w0T0KK8V015938@www262.sakura.ne.jp> X-Authentication-Warning: www262.sakura.ne.jp: i-love set sender to penguin-kernel@i-love.sakura.ne.jp using -f Subject: Re: kernel panic: Out of memory and no killable processes... (2) From: Tetsuo Handa To: davem@davemloft.net, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org Cc: aarcange@redhat.com, akpm@linux-foundation.org, guro@fb.com, kirill.shutemov@linux.intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, mhocko@suse.com, mingo@kernel.org, rientjes@google.com, syzkaller-bugs@googlegroups.com, yang.s@alibaba-inc.com MIME-Version: 1.0 Date: Mon, 29 Jan 2018 09:20:20 +0900 References: <001a1144b0caee2e8c0563d9de0a@google.com> In-Reply-To: <001a1144b0caee2e8c0563d9de0a@google.com> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org syzbot wrote: > syzbot hit the following crash on net-next commit > 6bb46bc57c8e9ce947cc605e555b7204b44d2b10 (Fri Jan 26 16:00:23 2018 +0000) > Merge branch 'cxgb4-fix-dump-collection-when-firmware-crashed' > > C reproducer is attached. > syzkaller reproducer is attached. > Raw console output is attached. > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached. > > IMPORTANT: if you fix the bug, please add the following tag to the commit: > Reported-by: syzbot+8630e35fc7287b392aac@syzkaller.appspotmail.com > It will help syzbot understand when the bug is fixed. See footer for > details. > If you forward the report, please keep this part and the footer. > > [ 3685] 0 3685 17821 1 184320 0 0 sshd > [ 3692] 0 3692 4376 0 32768 0 0 > syzkaller025682 > [ 3695] 0 3695 4376 0 36864 0 0 > syzkaller025682 > Kernel panic - not syncing: Out of memory and no killable processes... > This sounds like too huge vmalloc() request where size is controlled by userspace. ---------- [ 27.738855] syzkaller025682 invoked oom-killer: gfp_mask=0x14002c2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN), nodemask=(null), order=0, oom_score_adj=0 [ 27.754960] syzkaller025682 cpuset=/ mems_allowed=0 [ 27.760386] CPU: 0 PID: 3689 Comm: syzkaller025682 Not tainted 4.15.0-rc9+ #212 [ 27.767820] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 27.777166] Call Trace: [ 27.779739] dump_stack+0x194/0x257 [ 27.793194] dump_header+0x28c/0xe1e [ 27.888997] oom_kill_process+0x8b5/0x14a0 [ 27.981648] out_of_memory+0x86d/0x1220 [ 28.003684] __alloc_pages_slowpath+0x1d1b/0x2d00 [ 28.054140] __alloc_pages_nodemask+0x9fb/0xd80 [ 28.090590] alloc_pages_current+0xb6/0x1e0 [ 28.094927] __vmalloc_node_range+0x409/0x650 [ 28.103837] __vmalloc_node_flags_caller+0x50/0x60 [ 28.113166] kvmalloc_node+0x82/0xd0 [ 28.116869] xt_alloc_table_info+0x64/0xe0 [ 28.121097] do_ip6t_set_ctl+0x29b/0x5f0 [ 28.139158] nf_setsockopt+0x67/0xc0 [ 28.142862] ipv6_setsockopt+0x115/0x150 [ 28.146912] udpv6_setsockopt+0x45/0x80 [ 28.150867] sock_common_setsockopt+0x95/0xd0 [ 28.155359] SyS_setsockopt+0x189/0x360 [ 28.177379] entry_SYSCALL_64_fastpath+0x29/0xa0 ---------- struct xt_table_info *xt_alloc_table_info(unsigned int size) { (...snipped...) info = kvmalloc(sz, GFP_KERNEL); (...snipped...) } static int do_ip6t_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) { int ret; if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) return -EPERM; switch (cmd) { case IP6T_SO_SET_REPLACE: ret = do_replace(sock_net(sk), user, len); break; case IP6T_SO_SET_ADD_COUNTERS: ret = do_add_counters(sock_net(sk), user, len, 0); break; default: ret = -EINVAL; } return ret; } vmalloc() once became killable by commit 5d17a73a2ebeb8d1 ("vmalloc: back off when the current task is killed") but then became unkillable by commit b8c8a338f75e052d ("Revert "vmalloc: back off when the current task is killed""). Therefore, we can't handle this problem from MM side. Please consider adding some limit from networking side.