In the Linux kernel, the following vulnerability has been resolved:
misc: fastrpc: Fix double free of 'buf' in error path
smatch warning: drivers/misc/fastrpc.c:1926 fastrpcreqmmap() error: double free of 'buf'
In fastrpcreqmmap() error path, the fastrpc buffer is freed in fastrpcreqmunmap_impl() if unmap is successful.
But in the end, there is an unconditional call to fastrpcbuffree(). So the above case triggers the double free of fastrpc buf.
[
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/misc/fastrpc.c",
"function": "fastrpc_req_mmap"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f77dc8a75859e559f3238a6d906206259227985e",
"digest": {
"length": 2382.0,
"function_hash": "199612360792229458500611543131613088747"
},
"id": "CVE-2024-46741-40b02c2f"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/misc/fastrpc.c",
"function": "fastrpc_req_mmap"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8c276d4dc0e19ee48385f74426aebc855b49aaf",
"digest": {
"length": 2382.0,
"function_hash": "199612360792229458500611543131613088747"
},
"id": "CVE-2024-46741-607f5f80"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/misc/fastrpc.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e8c276d4dc0e19ee48385f74426aebc855b49aaf",
"digest": {
"line_hashes": [
"64403275060859988879850153873300876786",
"203843909277971239386644329536884968493",
"40116041599320964248765345320880774180",
"42618110359716637312237061373356685214",
"223204294359276285307745789775273769339",
"173797903293518226656091283524575508741",
"328332692401638632252392526931256490368",
"101513431176310190142168756571391902248",
"237198841021002716452267576204739496116"
],
"threshold": 0.9
},
"id": "CVE-2024-46741-70f97709"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/misc/fastrpc.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bfc1704d909dc9911a558b1a5833d3d61a43a1f2",
"digest": {
"line_hashes": [
"64403275060859988879850153873300876786",
"203843909277971239386644329536884968493",
"40116041599320964248765345320880774180",
"42618110359716637312237061373356685214",
"223204294359276285307745789775273769339",
"173797903293518226656091283524575508741",
"328332692401638632252392526931256490368",
"101513431176310190142168756571391902248",
"237198841021002716452267576204739496116"
],
"threshold": 0.9
},
"id": "CVE-2024-46741-b5ee9d05"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/misc/fastrpc.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f77dc8a75859e559f3238a6d906206259227985e",
"digest": {
"line_hashes": [
"64403275060859988879850153873300876786",
"203843909277971239386644329536884968493",
"40116041599320964248765345320880774180",
"42618110359716637312237061373356685214",
"223204294359276285307745789775273769339",
"173797903293518226656091283524575508741",
"328332692401638632252392526931256490368",
"101513431176310190142168756571391902248",
"237198841021002716452267576204739496116"
],
"threshold": 0.9
},
"id": "CVE-2024-46741-d8954bc7"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/misc/fastrpc.c",
"function": "fastrpc_req_mmap"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bfc1704d909dc9911a558b1a5833d3d61a43a1f2",
"digest": {
"length": 2382.0,
"function_hash": "199612360792229458500611543131613088747"
},
"id": "CVE-2024-46741-debb521f"
}
]