Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp982046ybl; Tue, 13 Aug 2019 05:45:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqyl9G94as42Y65Fzab9iUxNO8J9XjD4yd7IxYNRumqg1UyLbNb4zAKenGMBwxeT+Zr25vw+ X-Received: by 2002:a63:4c46:: with SMTP id m6mr35498818pgl.59.1565700327667; Tue, 13 Aug 2019 05:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565700327; cv=none; d=google.com; s=arc-20160816; b=bCbk/dnWS5da5M19O2Up30oRzt7A9BD/mySlDSMu8GNXaYLAF3e8ht/dO+MiZ3pVv2 BeWqXo7ZhJgGKFEWHejJ4ssTchM59oA6Kzxzu01J5xkhtqXm6k/TZ5J1MGEmeyFvkm4A +DCAn4tk9DlSun64PWEJ10hgufAT1nYQk12taZZf8+O4uxbYv0W3VjlPl/XTAD4U7Dq8 uMt2vF/geqVkQJOCVxHTlVXSXIsxR/kYcCAc3XFjnwKJOrlFxWkWfoD2bStZTHhAJKWA q3KDZ8idAfFjwJ3nL5otg3uvDc1D9acUg/7FOv2+pvo5J26VKJFr+Sb9wkOJRjhBIrrW ehWA== 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:mime-version :references:in-reply-to:date:to:from:subject:message-id; bh=IhIOxsn6oObgphBKNgT6cZCxBbUeNuX2KhlcWINkU50=; b=zhAeBYj42/HZhHu2cBORGe2Tm5AIcJsYgV5PVkr8a0eCclBbvEkm8imICB/uqfn9Lv CAulJ1styV3j/33se3n7XZjlzBN/fhXkuI0YmH98pbnlZl3q3R648RfqpARRbTWk3m4A /8BL4lyWyhsPfnTdu6CbxTXeol+HCNvGN9pYMs97aM9Mub9d2PMfUYrpIQdGh2KCeIAS GqoTxJRwsq7hS+ew5WrqzyADZyVZnLoM16xsbJ1e6UoT6EPqzaitOF2Dpe2BkgoK306M yAbpRCfLv2zdM+G6fnMtX3JTEtnh3dNFD1l1b9TGIRJcObEZCf36kRExuSPZR+H7QTPm cmUg== 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 h12si14072579pls.334.2019.08.13.05.45.11; Tue, 13 Aug 2019 05:45:27 -0700 (PDT) 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 S1728682AbfHMMnq (ORCPT + 99 others); Tue, 13 Aug 2019 08:43:46 -0400 Received: from mx2.suse.de ([195.135.220.15]:38764 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726903AbfHMMno (ORCPT ); Tue, 13 Aug 2019 08:43:44 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 22B2CACD8; Tue, 13 Aug 2019 12:43:43 +0000 (UTC) Message-ID: <1565700220.7043.8.camel@suse.com> Subject: Re: KMSAN: uninit-value in smsc75xx_bind From: Oliver Neukum To: syzbot , davem@davemloft.net, glider@google.com, syzkaller-bugs@googlegroups.com, steve.glendinning@shawell.net, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, netdev@vger.kernel.org Date: Tue, 13 Aug 2019 14:43:40 +0200 In-Reply-To: <0000000000009f4316058fab3bd7@google.com> References: <0000000000009f4316058fab3bd7@google.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, den 09.08.2019, 01:48 -0700 schrieb syzbot: > Hello, > > syzbot found the following crash on: > > HEAD commit: beaab8a3 fix KASAN build > git tree: kmsan [..] > Call Trace: > __dump_stack lib/dump_stack.c:77 [inline] > dump_stack+0x191/0x1f0 lib/dump_stack.c:113 > kmsan_report+0x162/0x2d0 mm/kmsan/kmsan_report.c:109 > __msan_warning+0x75/0xe0 mm/kmsan/kmsan_instr.c:294 > smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:976 [inline] > smsc75xx_bind+0x541/0x12d0 drivers/net/usb/smsc75xx.c:1483 > > Local variable description: ----buf.i93@smsc75xx_bind > Variable was created at: > __smsc75xx_read_reg drivers/net/usb/smsc75xx.c:83 [inline] > smsc75xx_wait_ready drivers/net/usb/smsc75xx.c:969 [inline] > smsc75xx_bind+0x44c/0x12d0 drivers/net/usb/smsc75xx.c:1483 > usbnet_probe+0x10d3/0x3950 drivers/net/usb/usbnet.c:1722 Hi, this looks like a false positive to me. The offending code is likely this: if (size) { buf = kmalloc(size, GFP_KERNEL); if (!buf) goto out; } err = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), cmd, reqtype, value, index, buf, size, USB_CTRL_GET_TIMEOUT); which uses 'buf' uninitialized. But it is used for input. What is happening here? Regards Oliver