Received: by 10.223.148.5 with SMTP id 5csp6031265wrq; Wed, 17 Jan 2018 08:34:35 -0800 (PST) X-Google-Smtp-Source: ACJfBov10Y6VmaqjFHmoxWqF5wEVJ2Uo3Vu6sOSTesBe2TRt2bEN6M2wkz+qLvqc4jjt/7CUILRw X-Received: by 10.99.129.199 with SMTP id t190mr11589952pgd.120.1516206875367; Wed, 17 Jan 2018 08:34:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516206875; cv=none; d=google.com; s=arc-20160816; b=VeNlpgEgdjPbUr0ejWSkQktuEGuRJMdcgs8VH99JRPBrohhoqgPYwURvvGkVaJ07oF B6ICIM/75s8n7w88E7YFgPyk2j3pP18hdrwhXhT41Dh5t3PPS+8jEMrSZo1uQbnZdEp0 csjOea70VTOU8MV4QIM/38NFwp2iDjv+gY3bRMiROjx1bPZBpjDBboCMZfG+EOrbdTrh Tq5Gisa4LPFG8PnvVEFfXCBCadF5u3Flm7VUfGj076LuYHk5CXs7Cuj8fLZINU1yCa9h xaSZSPjonH34CDnpEWe5Kkw89xD9rfzbslhTh9NNPAfPr62xOTIr4Va4Bii4isLk0UEc f8zw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=4j+2BnCtxVhozFNodNsmV4G00ZbDEwBBhnb511V9qu4=; b=uUUopovLYfGrrf0qGf4yOW2YDDsodakFgIaVaa/YllmZeE4TA2qSfnsO4GIDIkkFl8 AxuUL9CVOa3rkMKmGXpChuW/VyMnmQwYwXG4ItarGDgswBx8KVy+2D+KPgqVnN2QvCFO LTjdi5llmJa/PNIH3973RyhHOB3b6id0GO7bxQYkTskv3BBuTHrsV5HZRrx2CGx7Zrsz FBIIVd8hH1VppYwvJP6gwqfbamX8g8speDubfuM29O0+LakhZRHiLpAalRjZB022IU2s ow28c0oZEUpWvuT4IFlx/wklLUiZIYz5aJ3nQzDLBMDFqyViA9ijqAgD+PKc6R3aPq44 xpng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hartkopp.net header.s=strato-dkim-0002 header.b=MH2CDHm1; 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 r69si4226588pgr.678.2018.01.17.08.34.20; Wed, 17 Jan 2018 08:34:35 -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; dkim=pass header.i=@hartkopp.net header.s=strato-dkim-0002 header.b=MH2CDHm1; 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 S1754499AbeAQQcg (ORCPT + 99 others); Wed, 17 Jan 2018 11:32:36 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.220]:21504 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753974AbeAQQcb (ORCPT ); Wed, 17 Jan 2018 11:32:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1516206749; s=strato-dkim-0002; d=hartkopp.net; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:Date:Message-ID: From:References:Cc:To:Subject:X-RZG-CLASS-ID:X-RZG-AUTH; bh=4j+2BnCtxVhozFNodNsmV4G00ZbDEwBBhnb511V9qu4=; b=MH2CDHm11Sn1yJn1NmlVdebtJFcjFX84/2nu7JwZR/jJ+N9FAdpxiNwLbm5PGJVGkP A8b71xfDRBRZWIQDmR5/rBlIvy5x7XnHEFBHRyLWY53+n6nDWwuRo9+1SPFSHVA9zV4T kp49+s5bCw3kpaMX/PYn6egop4mw5ZMAPehNHMZgQDFPRyPKnqi1nLWYCsR7drLQD5Z6 n6JCMuSGdi18JSgA03JJD9QjoqQd6HedcbL/hI+2yyq+spxqqpEZ1oQupP6GtuvGs3JR 8oVcoZuurjx+ByAVzaPzEIB2OEBbK1T+iaEiPTLxwxBJMV/BT1kHhyepB76zkFNU/SQA RGFA== X-RZG-AUTH: :P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrDxb8mjG14FZxedJy6qgO1rHLMalyLi1fNpX87/zI= X-RZG-CLASS-ID: mo00 Received: from [10.180.29.82] (pool-22.254.176.62.dynamic.wobline-ip.de [62.176.254.22]) by smtp.strato.de (RZmta 42.16 DYNA|AUTH) with ESMTPSA id m07dddu0HGT92OV (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Wed, 17 Jan 2018 17:29:09 +0100 (CET) Subject: Re: WARNING in can_rcv To: Marc Kleine-Budde , Eric Biggers Cc: Dmitry Vyukov , syzbot , David Miller , linux-can@vger.kernel.org, LKML , netdev , syzkaller-bugs@googlegroups.com References: <001a11c16b40d795350562e878cc@google.com> <48c5623e-de78-5cfa-b537-2acf9a44ae51@hartkopp.net> <20180117071204.GG15527@zzz.localdomain> <359313e4-6280-8c97-a424-4f962b11c907@pengutronix.de> From: Oliver Hartkopp Message-ID: Date: Wed, 17 Jan 2018 17:29:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <359313e4-6280-8c97-a424-4f962b11c907@pengutronix.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/17/2018 10:43 AM, Marc Kleine-Budde wrote: > On 01/17/2018 09:07 AM, Oliver Hartkopp wrote: >> >> >> On 01/17/2018 08:12 AM, Eric Biggers wrote: >>> On Wed, Jan 17, 2018 at 07:39:24AM +0100, Oliver Hartkopp wrote: >>>> >>>> >>>> On 01/16/2018 07:11 PM, Dmitry Vyukov wrote: >>>>> On Tue, Jan 16, 2018 at 7:07 PM, Marc Kleine-Budde wrote: >>>>>> On 01/16/2018 06:58 PM, syzbot wrote: >>>>>>> Hello, >>>>>>> >>>>>>> syzkaller hit the following crash on >>>>>>> a8750ddca918032d6349adbf9a4b6555e7db20da >>>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.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 >>>>>>> >>>>>>> >>>>>>> IMPORTANT: if you fix the bug, please add the following tag to the commit: >>>>>>> Reported-by: syzbot+4386709c0c1284dca827@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. >>>>>>> >>>>>>> device eql entered promiscuous mode >>>>>>> ------------[ cut here ]------------ >>>>>>> PF_CAN: dropped non conform CAN skbuf: dev type 65534, len 42, datalen 0 >>>>>>> WARNING: CPU: 0 PID: 3650 at net/can/af_can.c:729 can_rcv+0x1c5/0x200 >>>>>>> net/can/af_can.c:724 >>>>>>> Kernel panic - not syncing: panic_on_warn set ... >>>>>> >>>>>> Invalid packages generate a warning (WARN_ONCE()), and you have >>>>>> panic_on_warn active. Should we better silently drop these CAN packages? >>>>> >>>>> Hi, >>>>> >>>>> pr_warn_once() will be more appropriate. It prints a single line. >>>>> >>>> >>>> The idea behind this WARN() is to detect really bad things that might have >>>> happen on network driver level: >>>> >>>> The CAN subsystem registers with dev_add_pack() for ETH_P_CAN and >>>> ETH_P_CANFD only. These ETH_P_ types are only allowed to be created by CAN >>>> network devices (like vcan, vxcan, and real CAN drivers). >>>> >>>> I don't have any strong opinion on using WARN() or pr_warn_once(). >>>> Is this detected violation worth using WARN(), as something already must >>>> have gone really wrong to trigger this issue? >>>> >>> >>> WARN() indicates a kernel bug. If it's instead "userspace did something >>> stupid", or "someone sent some unexpected network packet", it needs to be >>> pr_warn_once(), pr_warn_ratelimited(), or removed entirely. >> >> Ok. Thanks for the explanation! >> It is "some bogus network driver sent something unexpected" - but that >> does not harm the entire system. >> >> pr_warn_once() seems the right way to go then. > > Is this an Acked-by for both patches? > Yes :-) Acked-by: Oliver Hartkopp I just did not expect that you wanted to update the patches before sending ... Thanks, Oliver