CVE-2023-53478 (GCVE-0-2023-53478)
Vulnerability from cvelistv5
Published
2025-10-01 11:42
Modified
2025-10-01 11:42
Severity ?
VLAI Severity ?
EPSS score ?
Summary
In the Linux kernel, the following vulnerability has been resolved:
tracing/synthetic: Fix races on freeing last_cmd
Currently, the "last_cmd" variable can be accessed by multiple processes
asynchronously when multiple users manipulate synthetic_events node
at the same time, it could lead to use-after-free or double-free.
This patch add "lastcmd_mutex" to prevent "last_cmd" from being accessed
asynchronously.
================================================================
It's easy to reproduce in the KASAN environment by running the two
scripts below in different shells.
script 1:
while :
do
echo -n -e '\x88' > /sys/kernel/tracing/synthetic_events
done
script 2:
while :
do
echo -n -e '\xb0' > /sys/kernel/tracing/synthetic_events
done
================================================================
double-free scenario:
process A process B
------------------- ---------------
1.kstrdup last_cmd
2.free last_cmd
3.free last_cmd(double-free)
================================================================
use-after-free scenario:
process A process B
------------------- ---------------
1.kstrdup last_cmd
2.free last_cmd
3.tracing_log_err(use-after-free)
================================================================
Appendix 1. KASAN report double-free:
BUG: KASAN: double-free in kfree+0xdc/0x1d4
Free of addr ***** by task sh/4879
Call trace:
...
kfree+0xdc/0x1d4
create_or_delete_synth_event+0x60/0x1e8
trace_parse_run_command+0x2bc/0x4b8
synth_events_write+0x20/0x30
vfs_write+0x200/0x830
...
Allocated by task 4879:
...
kstrdup+0x5c/0x98
create_or_delete_synth_event+0x6c/0x1e8
trace_parse_run_command+0x2bc/0x4b8
synth_events_write+0x20/0x30
vfs_write+0x200/0x830
...
Freed by task 5464:
...
kfree+0xdc/0x1d4
create_or_delete_synth_event+0x60/0x1e8
trace_parse_run_command+0x2bc/0x4b8
synth_events_write+0x20/0x30
vfs_write+0x200/0x830
...
================================================================
Appendix 2. KASAN report use-after-free:
BUG: KASAN: use-after-free in strlen+0x5c/0x7c
Read of size 1 at addr ***** by task sh/5483
sh: CPU: 7 PID: 5483 Comm: sh
...
__asan_report_load1_noabort+0x34/0x44
strlen+0x5c/0x7c
tracing_log_err+0x60/0x444
create_or_delete_synth_event+0xc4/0x204
trace_parse_run_command+0x2bc/0x4b8
synth_events_write+0x20/0x30
vfs_write+0x200/0x830
...
Allocated by task 5483:
...
kstrdup+0x5c/0x98
create_or_delete_synth_event+0x80/0x204
trace_parse_run_command+0x2bc/0x4b8
synth_events_write+0x20/0x30
vfs_write+0x200/0x830
...
Freed by task 5480:
...
kfree+0xdc/0x1d4
create_or_delete_synth_event+0x74/0x204
trace_parse_run_command+0x2bc/0x4b8
synth_events_write+0x20/0x30
vfs_write+0x200/0x830
...
References
Impacted products
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"kernel/trace/trace_events_synth.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "9fe183f659a2704255e5d84f6ae308c234a113ec",
"status": "affected",
"version": "27c888da9867725784bad3d6455d6e53b425fa2b",
"versionType": "git"
},
{
"lessThan": "8826d9e7bd51e7656f78baa4472e8e2f5e7069f0",
"status": "affected",
"version": "27c888da9867725784bad3d6455d6e53b425fa2b",
"versionType": "git"
},
{
"lessThan": "4ccf11c4e8a8e051499d53a12f502196c97a758e",
"status": "affected",
"version": "27c888da9867725784bad3d6455d6e53b425fa2b",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"kernel/trace/trace_events_synth.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "5.18"
},
{
"lessThan": "5.18",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.1.*",
"status": "unaffected",
"version": "6.1.24",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.2.*",
"status": "unaffected",
"version": "6.2.11",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "6.3",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.1.24",
"versionStartIncluding": "5.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.2.11",
"versionStartIncluding": "5.18",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.3",
"versionStartIncluding": "5.18",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\ntracing/synthetic: Fix races on freeing last_cmd\n\nCurrently, the \"last_cmd\" variable can be accessed by multiple processes\nasynchronously when multiple users manipulate synthetic_events node\nat the same time, it could lead to use-after-free or double-free.\n\nThis patch add \"lastcmd_mutex\" to prevent \"last_cmd\" from being accessed\nasynchronously.\n\n================================================================\n\nIt\u0027s easy to reproduce in the KASAN environment by running the two\nscripts below in different shells.\n\nscript 1:\n while :\n do\n echo -n -e \u0027\\x88\u0027 \u003e /sys/kernel/tracing/synthetic_events\n done\n\nscript 2:\n while :\n do\n echo -n -e \u0027\\xb0\u0027 \u003e /sys/kernel/tracing/synthetic_events\n done\n\n================================================================\ndouble-free scenario:\n\n process A process B\n------------------- ---------------\n1.kstrdup last_cmd\n 2.free last_cmd\n3.free last_cmd(double-free)\n\n================================================================\nuse-after-free scenario:\n\n process A process B\n------------------- ---------------\n1.kstrdup last_cmd\n 2.free last_cmd\n3.tracing_log_err(use-after-free)\n\n================================================================\n\nAppendix 1. KASAN report double-free:\n\nBUG: KASAN: double-free in kfree+0xdc/0x1d4\nFree of addr ***** by task sh/4879\nCall trace:\n ...\n kfree+0xdc/0x1d4\n create_or_delete_synth_event+0x60/0x1e8\n trace_parse_run_command+0x2bc/0x4b8\n synth_events_write+0x20/0x30\n vfs_write+0x200/0x830\n ...\n\nAllocated by task 4879:\n ...\n kstrdup+0x5c/0x98\n create_or_delete_synth_event+0x6c/0x1e8\n trace_parse_run_command+0x2bc/0x4b8\n synth_events_write+0x20/0x30\n vfs_write+0x200/0x830\n ...\n\nFreed by task 5464:\n ...\n kfree+0xdc/0x1d4\n create_or_delete_synth_event+0x60/0x1e8\n trace_parse_run_command+0x2bc/0x4b8\n synth_events_write+0x20/0x30\n vfs_write+0x200/0x830\n ...\n\n================================================================\nAppendix 2. KASAN report use-after-free:\n\nBUG: KASAN: use-after-free in strlen+0x5c/0x7c\nRead of size 1 at addr ***** by task sh/5483\nsh: CPU: 7 PID: 5483 Comm: sh\n ...\n __asan_report_load1_noabort+0x34/0x44\n strlen+0x5c/0x7c\n tracing_log_err+0x60/0x444\n create_or_delete_synth_event+0xc4/0x204\n trace_parse_run_command+0x2bc/0x4b8\n synth_events_write+0x20/0x30\n vfs_write+0x200/0x830\n ...\n\nAllocated by task 5483:\n ...\n kstrdup+0x5c/0x98\n create_or_delete_synth_event+0x80/0x204\n trace_parse_run_command+0x2bc/0x4b8\n synth_events_write+0x20/0x30\n vfs_write+0x200/0x830\n ...\n\nFreed by task 5480:\n ...\n kfree+0xdc/0x1d4\n create_or_delete_synth_event+0x74/0x204\n trace_parse_run_command+0x2bc/0x4b8\n synth_events_write+0x20/0x30\n vfs_write+0x200/0x830\n ..."
}
],
"providerMetadata": {
"dateUpdated": "2025-10-01T11:42:47.185Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/9fe183f659a2704255e5d84f6ae308c234a113ec"
},
{
"url": "https://git.kernel.org/stable/c/8826d9e7bd51e7656f78baa4472e8e2f5e7069f0"
},
{
"url": "https://git.kernel.org/stable/c/4ccf11c4e8a8e051499d53a12f502196c97a758e"
}
],
"title": "tracing/synthetic: Fix races on freeing last_cmd",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2023-53478",
"datePublished": "2025-10-01T11:42:47.185Z",
"dateReserved": "2025-10-01T11:39:39.401Z",
"dateUpdated": "2025-10-01T11:42:47.185Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.1",
"vulnerability-lookup:meta": {
"nvd": "{\"cve\":{\"id\":\"CVE-2023-53478\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-10-01T12:15:50.270\",\"lastModified\":\"2025-10-02T19:12:17.160\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\ntracing/synthetic: Fix races on freeing last_cmd\\n\\nCurrently, the \\\"last_cmd\\\" variable can be accessed by multiple processes\\nasynchronously when multiple users manipulate synthetic_events node\\nat the same time, it could lead to use-after-free or double-free.\\n\\nThis patch add \\\"lastcmd_mutex\\\" to prevent \\\"last_cmd\\\" from being accessed\\nasynchronously.\\n\\n================================================================\\n\\nIt\u0027s easy to reproduce in the KASAN environment by running the two\\nscripts below in different shells.\\n\\nscript 1:\\n while :\\n do\\n echo -n -e \u0027\\\\x88\u0027 \u003e /sys/kernel/tracing/synthetic_events\\n done\\n\\nscript 2:\\n while :\\n do\\n echo -n -e \u0027\\\\xb0\u0027 \u003e /sys/kernel/tracing/synthetic_events\\n done\\n\\n================================================================\\ndouble-free scenario:\\n\\n process A process B\\n------------------- ---------------\\n1.kstrdup last_cmd\\n 2.free last_cmd\\n3.free last_cmd(double-free)\\n\\n================================================================\\nuse-after-free scenario:\\n\\n process A process B\\n------------------- ---------------\\n1.kstrdup last_cmd\\n 2.free last_cmd\\n3.tracing_log_err(use-after-free)\\n\\n================================================================\\n\\nAppendix 1. KASAN report double-free:\\n\\nBUG: KASAN: double-free in kfree+0xdc/0x1d4\\nFree of addr ***** by task sh/4879\\nCall trace:\\n ...\\n kfree+0xdc/0x1d4\\n create_or_delete_synth_event+0x60/0x1e8\\n trace_parse_run_command+0x2bc/0x4b8\\n synth_events_write+0x20/0x30\\n vfs_write+0x200/0x830\\n ...\\n\\nAllocated by task 4879:\\n ...\\n kstrdup+0x5c/0x98\\n create_or_delete_synth_event+0x6c/0x1e8\\n trace_parse_run_command+0x2bc/0x4b8\\n synth_events_write+0x20/0x30\\n vfs_write+0x200/0x830\\n ...\\n\\nFreed by task 5464:\\n ...\\n kfree+0xdc/0x1d4\\n create_or_delete_synth_event+0x60/0x1e8\\n trace_parse_run_command+0x2bc/0x4b8\\n synth_events_write+0x20/0x30\\n vfs_write+0x200/0x830\\n ...\\n\\n================================================================\\nAppendix 2. KASAN report use-after-free:\\n\\nBUG: KASAN: use-after-free in strlen+0x5c/0x7c\\nRead of size 1 at addr ***** by task sh/5483\\nsh: CPU: 7 PID: 5483 Comm: sh\\n ...\\n __asan_report_load1_noabort+0x34/0x44\\n strlen+0x5c/0x7c\\n tracing_log_err+0x60/0x444\\n create_or_delete_synth_event+0xc4/0x204\\n trace_parse_run_command+0x2bc/0x4b8\\n synth_events_write+0x20/0x30\\n vfs_write+0x200/0x830\\n ...\\n\\nAllocated by task 5483:\\n ...\\n kstrdup+0x5c/0x98\\n create_or_delete_synth_event+0x80/0x204\\n trace_parse_run_command+0x2bc/0x4b8\\n synth_events_write+0x20/0x30\\n vfs_write+0x200/0x830\\n ...\\n\\nFreed by task 5480:\\n ...\\n kfree+0xdc/0x1d4\\n create_or_delete_synth_event+0x74/0x204\\n trace_parse_run_command+0x2bc/0x4b8\\n synth_events_write+0x20/0x30\\n vfs_write+0x200/0x830\\n ...\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/4ccf11c4e8a8e051499d53a12f502196c97a758e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/8826d9e7bd51e7656f78baa4472e8e2f5e7069f0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/9fe183f659a2704255e5d84f6ae308c234a113ec\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.
Loading…
Loading…