diff options
| author | Thomas Fourier <fourier.thomas@gmail.com> | 2026-10-06 16:32:40 +0200 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-08 10:51:01 -0700 |
| commit | c16411fff03b29a806898b20338ed3ef27124f96 (patch) | |
| tree | c501678bf932ecf2c886f5548659c472f881f79e /include/linux | |
| parent | 2b358bb4af0e06f154d27115f17150a8c2486e4f (diff) | |
net: ethernet: i825xx: Fix dma_alloc_coherent() size
In sni_82596_probe(), the lp->dma buffer is allocated with
dma_alloc_coherent() and with size sizeof(struct i596_dma), and possibly
freed in the error path with the same size. However, in
sni_82596_driver_remove(), the same buffer is freed but with size
sizeof(struct i596_private). This error may leave the freed buffers
mapped, leaking a resource and allowing the device to access freed
memory.
Change the length in sni_82596_driver_remove() to
sizeof(struct i596_dma).
This patch was compile tested only, and found by hand.
Cc: stable+noautosel@kernel.org # LLM report + LLM fix, untested
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20261006143247.54724-2-fourier.thomas@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
