[BUG] atm: idt77252: Found a bug when removing the module

From: Zheyu Ma
Date: Sat May 21 2022 - 07:48:28 EST


Hello,

I found a bug in the driver idt77252, when removing the module, I got
the following flaw:

[ 14.576507] BUG: KASAN: use-after-free in
idt77252_interrupt+0xfde/0x13c0 [idt77252]
[ 14.576980] Read of size 8 at addr ffff88800a428008 by task modprobe/292
[ 14.578516] Call Trace:
[ 14.580577] idt77252_interrupt+0xfde/0x13c0 [idt77252]

The bug occurs in line 2770, I guess that the reason is that the
driver free the irq too late.

Zheyu Ma