lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] epic100: fix use after free on rmmod
Tong Zhang <ztong0001@gmail.com> :
> epic_close() calls epic_rx() and uses dma buffer, but in epic_remove_one()
> we already freed the dma buffer. To fix this issue, reorder function calls
> like in the .probe function.
>
> BUG: KASAN: use-after-free in epic_rx+0xa6/0x7e0 [epic100]
> Call Trace:
> epic_rx+0xa6/0x7e0 [epic100]
> epic_close+0xec/0x2f0 [epic100]
> unregister_netdev+0x18/0x20
> epic_remove_one+0xaa/0xf0 [epic100]
>
> Fixes: ae150435b59e ("smsc: Move the SMC (SMSC) drivers")
> Reported-by: Yilun Wu <yiluwu@cs.stonybrook.edu>
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>

The "Fixes:" tag is a bit misleading: this code path predates the move
by several years. Ignoring pci_* vs dma_* API changes, this is pre-2005
material.

Reviewed-by: Francois Romieu <romieu@fr.zoreil.com>

--
Ueimor

\
 
 \ /
  Last update: 2022-06-23 11:27    [W:0.591 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site