Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp239205pxb; Tue, 19 Oct 2021 01:43:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqxX1zFBzFMeNyNIXrDAA/fSsDt3vEfmVrk/I4MGipW5oI+VAW7GCPzJUkkzADLY5ZzIAN X-Received: by 2002:a62:1553:0:b0:44c:67cf:e669 with SMTP id 80-20020a621553000000b0044c67cfe669mr33953677pfv.55.1634633038828; Tue, 19 Oct 2021 01:43:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1634633038; cv=pass; d=google.com; s=arc-20160816; b=obgnpAmlQzW4tbYDWIpe8EvENAOSm8QhNjPJtHzsCSh3tp220sjOW5khArWW6mHK4N eFAtCJ/1crppUkh7UkDSn5RsrRsL9Hx7NX7K6BKWNYA1EQCuHQK/lEUI7OyBp7yGP2SJ Ewabo+fazITf3r+bxks7oswjeYWwBTGEPE7YcjnYg7kdAaKsafhxnIDaciVbzDvwJBUY N2mpv5IesbCsMHLHbu0DU50LqYVg13Aqy36klX8WUz5Qvw42whkYbBGEYAZPrcK+saj/ crfqZLjMxmSRp2Arn65xAgU9v4dW8c8JfZ1mfNoMa9BxbEgflSLkfwPTyi4T9FihZPgL mLeQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-language:in-reply-to :user-agent:date:message-id:references:to:subject:from :dkim-signature; bh=oT3yntYjFTj2N8PIpuaDiwDwCqs+85QID6dyNwUOBFs=; b=J3GwTsSOADurdGDLb1bbqdbkNTdjBLOwJ+iXqVX8/1HFlIpwMP36gJlTjrrKpui3I9 9IcneGLuSfcSAoLEDi8lla87OjDeng5ogOrdM7JsAWZkeFuf9QyFx7iqD3KXZAnYgdvA oauA/6IFxgn5W4h//0dViPJMXxjrFsqdT1GORas6Kd0WNaJ/Zdjbzs6J0CNFhAlJOdM6 AFRCubH2Tzxak7o+OHEUnFiaI6Sz4GtRduGt0Yoh6kzEKwF+sJO38njxq59q4QyyVumn jDUR72TR6A6LXT6XRMqn5vQsz+eWbj4esc9nMWjyLazHWEI/MBy+NPvgvOkk7rPz+D/h /V5Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=H4mnEbVU; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n25si20260392pgm.224.2021.10.19.01.43.45; Tue, 19 Oct 2021 01:43:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=mimecast20200619 header.b=H4mnEbVU; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234780AbhJSInS (ORCPT + 99 others); Tue, 19 Oct 2021 04:43:18 -0400 Received: from de-smtp-delivery-102.mimecast.com ([194.104.109.102]:37417 "EHLO de-smtp-delivery-102.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234592AbhJSInL (ORCPT ); Tue, 19 Oct 2021 04:43:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=mimecast20200619; t=1634632858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oT3yntYjFTj2N8PIpuaDiwDwCqs+85QID6dyNwUOBFs=; b=H4mnEbVUj8mI50OsRRvp5oOJ5NDj2R//4zKohOw30SmSAWbA6ud2HOVaLiNBNbNkO/rHIh e+5JBiDWJOVbe+AjkZa5MDGVPrZGcNb0bJT6zty0sLdTowBynU3shckAw3i5hAhGkDsHhI 7o+nzj+VS1yEd71+f6S+no1NLQh3p5A= Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04lp2053.outbound.protection.outlook.com [104.47.13.53]) (Using TLS) by relay.mimecast.com with ESMTP id de-mta-31-y4iEPW6FP1-NNa0JFoHvWg-1; Tue, 19 Oct 2021 10:40:57 +0200 X-MC-Unique: y4iEPW6FP1-NNa0JFoHvWg-1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZQ865chhhrgHDgHWiWBA9EVRsTANv0vbXb3MtBKCFxhl83tdENBZrtSc854ss16WvSHdu9em3+lfq7AvTAKlQVy8UmYQDyEacxrhnjG7dCKqbEt3brSPv1G/m+bmDksS26T7ZOckx46udQpJOhw0FT7OPIXzsSnpdLpcLkfy9iOJZZ+XDxhjZEfktdzhmZ5+PWQjWPi+4yK7C9PnUyvxnuJDnyvFXAQTewEV3Ao9DqtNsmZkg/NHJG1I5TrTzLOiTF74dcgHlClHrIhg0sdCTTJkJERDlkjvP99/bnb4eO3MqOFM0uVQfARKcXqJALAGhn7AOhl91VnMqE5842Hm0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oT3yntYjFTj2N8PIpuaDiwDwCqs+85QID6dyNwUOBFs=; b=TUgNlSUtrfJ1BYiHB3P6MmwtOL3uTqiK3RVS8S/2aewGMWTnVItGxKQ2KtxDgyvJR394MrVGJaS/FbdKVYBkwN28lIX/QOkYkJrlVY9cTmKE+T19xpFARR5PstW6xrmKb1908dp3Wq+pHLpEgOH1/xg7U3QPQAS1S9eaUCo5R3EcIaD4z2HhCioVtYapmHXbaN/rWgtFkac36h6cw+azpetYPjBy/Q7vJ9pd/7YPR1sCLsk3iuWgBShlrWoREp0SBgcZzR7zBwa3Xo2WEzhkeV8nPeymY/+ltche56grJcxUdDZ/1vKWDenhLbZzJVPt2DPrlOuAbBh3yvcKl1zHTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Authentication-Results: googlegroups.com; dkim=none (message not signed) header.d=none;googlegroups.com; dmarc=none action=none header.from=suse.com; Received: from DB7PR04MB5050.eurprd04.prod.outlook.com (2603:10a6:10:22::23) by DB6PR0401MB2293.eurprd04.prod.outlook.com (2603:10a6:4:47::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Tue, 19 Oct 2021 08:40:55 +0000 Received: from DB7PR04MB5050.eurprd04.prod.outlook.com ([fe80::61c5:2592:9e7f:a390]) by DB7PR04MB5050.eurprd04.prod.outlook.com ([fe80::61c5:2592:9e7f:a390%5]) with mapi id 15.20.4608.018; Tue, 19 Oct 2021 08:40:55 +0000 From: Oliver Neukum Subject: Re: [syzbot] divide error in genelink_tx_fixup To: syzbot , davem@davemloft.net, kuba@kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org, syzkaller-bugs@googlegroups.com References: <000000000000809ecc05cea5165d@google.com> Message-ID: <649fd15d-4e23-f283-3a58-f294d59305c7@suse.com> Date: Tue, 19 Oct 2021 10:40:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 In-Reply-To: <000000000000809ecc05cea5165d@google.com> Content-Type: multipart/mixed; boundary="------------FA2C7BB85455DE572841162A" Content-Language: en-US X-ClientProxiedBy: AM6P194CA0037.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::14) To DB7PR04MB5050.eurprd04.prod.outlook.com (2603:10a6:10:22::23) MIME-Version: 1.0 Received: from linux.fritz.box (2001:a61:3b0d:4601:21ab:d1da:15e9:ca07) by AM6P194CA0037.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Tue, 19 Oct 2021 08:40:55 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 598cf07d-6c25-4808-e173-08d992dc2aaa X-MS-TrafficTypeDiagnostic: DB6PR0401MB2293: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 77RV43nRfKNnT2Rts4xLagHs8+t+DDWM3LK2hclGogXKm31SIbfy5Ig6eIoJvri27asrXrBsnd663OwV3933yKsNPQnIY1umDKHDbmhINSIqEnsJjvi49beTsl86u4KjPei86gDcmxIiwDjQJ2+y7Y4rxJaIbSMIjK41wxCGjXj6CrPzIKQiPR4NgXk7FR9YSpPia/XmljerSU6ZzVhJbUesNg8MqENNBX3qQYq6fzpE7soxmamgxAKG0wim+wBNcsgFkFlbzgTgQnUV6osKrAZ9w9Jfvo8k2OezfimPh/w3jgXIHeNdRycj/mLU947mbhr4uGn84Vz1iHDcFubuxAdZRUU3ns6DrpxMX8mHvUD5y67MV4PEu7mwNFLkW8MfIonCQTImCIkMHQCMIQAZIadteokpAzar8aDD6vjyn9WTcJOGPavGqNLUZdRmwcGmLk0p+u1BHw0MZLU7Yuz5tXhk6gTUhCnHAU95GIEKC39N8tRrlSLKcpCEYsWmX8zfeKkh5ZoI2+TWAuOWNnlgFY0eQmpbp2GI70sjTASGDzW3NNTBo8uijcOnqDm4TYCHiRQt7ajVDl8LMEIE4Iaaj0vL/kmScuDpKRiK/efPK5YHMWr0CG+HjISBS265l6RXLcn9fVuiPZwaRoVB3tnY3+QMh0FRZH1rb8sDgxIPLE1waODXMCgjjo/HzFX6dIgTsg3GcF8vK3j7kWAQv99pxkJ1A7YAvTFLDRyHXL4h8WjQP7W9JMh/wzMpiJBAvf9YNamwZMqSCYpsJlzzlFhwzY+RkNfnXt19I2312kI6MJYnKM/6dEoYRK7XfyDfeFHAEJB5yHHwEgp62Iphz6bwpTPQjwXO0cHUNtIgXJMvHvOtNYGOEaPhW6EF1p/GrBJAUP7MAW06EzF31MirLNWBxsfHiAgAcldj7wk6GxY0IkY= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB7PR04MB5050.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(5660300002)(2906002)(53546011)(36756003)(508600001)(86362001)(66946007)(8936002)(66476007)(31686004)(38100700002)(33964004)(66556008)(8676002)(316002)(186003)(2616005)(6486002)(31696002)(6506007)(6512007)(966005)(235185007)(99710200001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QlRmU3ZucmNDTFJjMk5jVFpmMWI1NDVzY0NYT1BZbzE5SEczLysrNlp5WXlo?= =?utf-8?B?bTZ6UkhTdkZ6dFN6ZElNa3B0SThkSitLMTJTMDQ5RzNXdlRVL2FlZWM4UkdW?= =?utf-8?B?dDlaRkJDWHpmRnZrSUUvNStOdEJYaEsva2sxOVBFV2VackU5WnlTOFY4a3d2?= =?utf-8?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uthSource: DB7PR04MB5050.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Oct 2021 08:40:55.7067 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BwVOqtp6DBZnWt+8G+8ytaUoA+8Ch31WzGs9pZwuzM/qEgPLo1VV7I50sYTqWh8LiUqgvT5GNkNhE2ETjcxY9A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2293 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --------------FA2C7BB85455DE572841162A Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 18.10.21 20:55, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit: 660a92a59b9e usb: xhci: Enable runtime-pm by default on AM.. > git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing > console output: https://syzkaller.appspot.com/x/log.txt?x=1506ccf0b00000 > kernel config: https://syzkaller.appspot.com/x/.config?x=5016916cdc0a4a84 > dashboard link: https://syzkaller.appspot.com/bug?extid=a6ec4dd9d38cb9261a77 > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11308734b00000 > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12f56f68b00000 > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > Reported-by: syzbot+a6ec4dd9d38cb9261a77@syzkaller.appspotmail.com #syz test   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git c03fb16bafdf --------------FA2C7BB85455DE572841162A Content-Type: text/x-patch; charset=UTF-8; name="0001-usbnet-sanity-check-for-maxpacket.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-usbnet-sanity-check-for-maxpacket.patch" From a5270791d4480e9a6bc009c69a4454039aa160e7 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Tue, 19 Oct 2021 10:02:42 +0200 Subject: [PATCH] usbnet: sanity check for maxpacket We cannot leave maxpacket at 0 because we divide by it. Devices that give us a 0 there are unlikely to work, but let's assume a 1, so we don't oops and a least try to operate. Signed-off-by: Oliver Neukum Reported-by: syzbot+76bb1d34ffa0adc03baa@syzkaller.appspotmail.com --- drivers/net/usb/usbnet.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 840c1c2ab16a..2bdc3e0c1579 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -1788,6 +1788,9 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) if (!dev->rx_urb_size) dev->rx_urb_size = dev->hard_mtu; dev->maxpacket = usb_maxpacket (dev->udev, dev->out, 1); + if (dev->maxpacket == 0) + /* that is a strange device */ + dev->maxpacket = 1; /* let userspace know we have a random address */ if (ether_addr_equal(net->dev_addr, node_id)) -- 2.26.2 --------------FA2C7BB85455DE572841162A--