OSDN Git Service

ISDN: hfcsusb: checking idx of ep configuration
authorPhong Tran <tranmanphong@gmail.com>
Mon, 15 Jul 2019 15:08:14 +0000 (22:08 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Aug 2019 07:35:01 +0000 (09:35 +0200)
commit4ef54f331818f5d651e18fd640ec47d0b6eebf46
treecb294499ee7376cb843cec5a53da2633085df8d5
parent8f0b77b71f3fec09f86f80cd98c36a1a35109499
ISDN: hfcsusb: checking idx of ep configuration

commit f384e62a82ba5d85408405fdd6aeff89354deaa9 upstream.

The syzbot test with random endpoint address which made the idx is
overflow in the table of endpoint configuations.

this adds the checking for fixing the error report from
syzbot

KASAN: stack-out-of-bounds Read in hfcsusb_probe [1]
The patch tested by syzbot [2]

Reported-by: syzbot+8750abbc3a46ef47d509@syzkaller.appspotmail.com
[1]:
https://syzkaller.appspot.com/bug?id=30a04378dac680c5d521304a00a86156bb913522
[2]:
https://groups.google.com/d/msg/syzkaller-bugs/_6HBdge8F3E/OJn7wVNpBAAJ

Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/isdn/hardware/mISDN/hfcsusb.c