media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 14 Dec 2020 11:53:31 +0000 (12:53 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 22 Mar 2021 22:28:09 +0000 (23:28 +0100)
commitba11bbf303fafb33989e95473e409f6ab412b18d
tree4a6a62560f325c503321e52c525aae9978ec32e4
parent3881a5a77683a04de2f399d61700e374699a7b67
media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()

The "s3a_buf" is freed along with all the other items on the
"asd->s3a_stats" list.  It leads to a double free and a use after free.

Link: https://lore.kernel.org/linux-media/X9dSO3RGf7r0pq2k@mwanda
Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c