CVE-2024-50084
CVE-2024-50084
Mar, 29/10/2024 – 01:15
CVE-2024-50084
net: microchip: vcap api: Fix memory leaks in vcap_api_encode_rule_test()
Commit a3c1e45156ad ("net: microchip: vcap: Fix use-after-free error in
kunit test") fixed the use-after-free error, but introduced below
memory leaks by removing necessary vcap_free_rule(), add it to fix it.
unreferenced object 0xffffff80ca58b700 (size 192):
comm "kunit_try_catch", pid 1215, jiffies 4294898264
hex dump (first 32 bytes):
00 12 7a 00 05 00 00 00 0a 00 00 00 64 00 00 00 ..z………d…
00 00 00 00 00 00 00 00 00 04 0b cc 80 ff ff ff …………….
backtrace (crc 9c09c3fe):
[] kmemleak_alloc+0x34/0x40
[] __kmalloc_cache_noprof+0x26c/0x2f4
[] vcap_alloc_rule+0x3cc/0x9c4
[] vcap_api_encode_rule_test+0x1ac/0x16b0
[] kunit_try_run_case+0x13c/0x3ac
[] kunit_generic_run_threadfn_adapter+0x80/0xec
[] kthread+0x2e8/0x374
[] ret_from_fork+0x10/0x20
unreferenced object 0xffffff80cc0b0400 (size 64):
comm "kunit_try_catch", pid 1215, jiffies 4294898265
hex dump (first 32 bytes):
80 04 0b cc 80 ff ff ff 18 b7 58 ca 80 ff ff ff ……….X…..
39 00 00 00 02 00 00 00 06 05 04 03 02 01 ff ff 9……………
backtrace (crc daf014e9):
[] kmemleak_alloc+0x34/0x40
[] __kmalloc_cache_noprof+0x26c/0x2f4
[] vcap_rule_add_key+0x2cc/0x528
[] vcap_api_encode_rule_test+0x224/0x16b0
[] kunit_try_run_case+0x13c/0x3ac
[] kunit_generic_run_threadfn_adapter+0x80/0xec
[] kthread+0x2e8/0x374
[] ret_from_fork+0x10/0x20
unreferenced object 0xffffff80cc0b0700 (size 64):
comm "kunit_try_catch", pid 1215, jiffies 4294898265
hex dump (first 32 bytes):
80 07 0b cc 80 ff ff ff 28 b7 58 ca 80 ff ff ff ……..(.X…..
3c 00 00 00 00 00 00 00 01 2f 03 b3 ec ff ff ff
