]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:53 +0000 (10:49 +0200)
commit801c1d505894008c888bc71d08d5cff5d87f8aba
tree5cca5833aa358f7c537788157b4478bee5e59c1d
parent0bfd47439b1e2eb0bd90c7a9752e8b9720fe0885
media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs()

[ Upstream commit ba11bbf303fafb33989e95473e409f6ab412b18d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_ioctl.c