From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: "Bjørn Mork" <bjorn@mork.no>,
syzbot+b68605d7fadd21510de1@syzkaller.appspotmail.com,
"Kristian Evensen" <kristian.evensen@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
"Sasha Levin" <sashal@kernel.org>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org
Subject: [PATCH AUTOSEL 4.19 15/26] qmi_wwan: Fix out-of-bounds read
Date: Tue, 2 Jul 2019 22:16:14 -0400 [thread overview]
Message-ID: <20190703021625.18116-15-sashal@kernel.org> (raw)
In-Reply-To: <20190703021625.18116-1-sashal@kernel.org>
From: Bjørn Mork <bjorn@mork.no>
[ Upstream commit 904d88d743b0c94092c5117955eab695df8109e8 ]
The syzbot reported
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0xca/0x13e lib/dump_stack.c:113
print_address_description+0x67/0x231 mm/kasan/report.c:188
__kasan_report.cold+0x1a/0x32 mm/kasan/report.c:317
kasan_report+0xe/0x20 mm/kasan/common.c:614
qmi_wwan_probe+0x342/0x360 drivers/net/usb/qmi_wwan.c:1417
usb_probe_interface+0x305/0x7a0 drivers/usb/core/driver.c:361
really_probe+0x281/0x660 drivers/base/dd.c:509
driver_probe_device+0x104/0x210 drivers/base/dd.c:670
__device_attach_driver+0x1c2/0x220 drivers/base/dd.c:777
bus_for_each_drv+0x15c/0x1e0 drivers/base/bus.c:454
Caused by too many confusing indirections and casts.
id->driver_info is a pointer stored in a long. We want the
pointer here, not the address of it.
Thanks-to: Hillf Danton <hdanton@sina.com>
Reported-by: syzbot+b68605d7fadd21510de1@syzkaller.appspotmail.com
Cc: Kristian Evensen <kristian.evensen@gmail.com>
Fixes: e4bf63482c30 ("qmi_wwan: Add quirk for Quectel dynamic config")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/usb/qmi_wwan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index d9a6699abe59..e657d8947125 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1412,7 +1412,7 @@ static int qmi_wwan_probe(struct usb_interface *intf,
* different. Ignore the current interface if the number of endpoints
* equals the number for the diag interface (two).
*/
- info = (void *)&id->driver_info;
+ info = (void *)id->driver_info;
if (info->data & QMI_WWAN_QUIRK_QUECTEL_DYNCFG) {
if (desc->bNumEndpoints == 2)
--
2.20.1
next prev parent reply other threads:[~2019-07-03 2:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-03 2:16 [PATCH AUTOSEL 4.19 01/26] irqchip/gic-v3-its: Fix command queue pointer comparison bug Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 02/26] clk: ti: clkctrl: Fix returning uninitialized data Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 03/26] efi/bgrt: Drop BGRT status field reserved bits check Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 04/26] perf/core: Fix perf_sample_regs_user() mm check Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 05/26] ARM: dts: gemini Fix up DNS-313 compatible string Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 06/26] ARM: omap2: remove incorrect __init annotation Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 07/26] afs: Fix uninitialised spinlock afs_volume::cb_break_lock Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 08/26] x86/apic: Fix integer overflow on 10 bit left shift of cpu_khz Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 09/26] be2net: fix link failure after ethtool offline test Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 10/26] ppp: mppe: Add softdep to arc4 Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 11/26] net: stmmac: fixed new system time seconds value calculation Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 12/26] net: stmmac: set IC bit when transmitting frames with HW timestamp Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 13/26] sis900: fix TX completion Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 14/26] ARM: dts: imx6ul: fix PWM[1-4] interrupts Sasha Levin
2019-07-03 2:16 ` Sasha Levin [this message]
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 16/26] pinctrl: mcp23s08: Fix add_data and irqchip_add_nested call order Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 17/26] dm table: don't copy from a NULL pointer in realloc_argv() Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 18/26] dm verity: use message limit for data block corruption message Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 19/26] x86/boot/64: Fix crash if kernel image crosses page table boundary Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 20/26] x86/boot/64: Add missing fixup_pointer() for next_early_pgt access Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 21/26] HID: chicony: add another quirk for PixArt mouse Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 22/26] HID: multitouch: Add pointstick support for ALPS Touchpad Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 23/26] pinctrl: mediatek: Ignore interrupts that are wake only during resume Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 24/26] cpu/hotplug: Fix out-of-bounds read when setting fail state Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 25/26] pinctrl: mediatek: Update cur_mask in mask/mask ops Sasha Levin
2019-07-03 2:16 ` [PATCH AUTOSEL 4.19 26/26] linux/kernel.h: fix overflow for DIV_ROUND_UP_ULL Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190703021625.18116-15-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=bjorn@mork.no \
--cc=davem@davemloft.net \
--cc=kristian.evensen@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+b68605d7fadd21510de1@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).