usb: gadget: f_fs: Remove WARN_ON in functionfs_bind
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Remove WARN_ON in functionfs_bind This commit addresses an issue related to below kernel panic where panic_on_warn is enabled. It is caused by the unnecessary use of WARN_ON in functionsfs_bind, which easily leads to the following scenarios. 1.adb_write in adbd 2. UDC write via configfs ================= ===================== ->usb_ffs_open_thread() ->UDC write ->open_functionfs() ->configfs_write_iter() ->adb_open() ->gadget_dev_desc_UDC_store() ->adb_write() ->usb_gadget_register_driver_owner ->driver_register() ->StartMonitor() ->bus_add_driver() ->adb_read() ->gadget_bind_driver() ->configfs_composite_bind() ->usb_add_function() ->open_functionfs() ->ffs_func_bind() ->adb_open() ->functionfs_bind() state !=FFS_ACTIVE> The adb_open, adb_read, and adb_write operations are invoked from the daemon, but trying to bind the function is a process that is invoked by UDC write through configfs, which opens up the possibility of a race condition between the two paths. In this race scenario, the kernel panic occurs due to the WARN_ON from functionfs_bind when panic_on_warn is enabled. This commit fixes the kernel panic by removing the unnecessary WARN_ON. Kernel panic - not syncing: kernel: panic_on_warn set ... [ 14.542395] Call trace: [ 14.542464] ffs_func_bind+0x1c8/0x14a8 [ 14.542468] usb_add_function+0xcc/0x1f0 [ 14.542473] configfs_composite_bind+0x468/0x588 [ 14.542478] gadget_bind_driver+0x
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.234, 5.15.177, 5.4.290, 6.1.125, 6.12.10, 6.6.72
- CVEs
- CVE-2024-57913
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 10:33 UTC · Revision 1
Source evidence
usb: gadget: f_fs: Remove WARN_ON in functionfs_bind
core-osv · Original sourcePublished 19 Jan 2025, 11:52 UTC
In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Remove WARN_ON in functionfs_bind This commit addresses an issue related to below kernel panic where panic_on_warn is enabled. It is caused by the unnecessary use of WARN_ON in functionsfs_bind, which easily leads to the following scenarios. 1.adb_write in adbd 2. UDC write via configfs ================= ===================== ->usb_ffs_open_thread() ->UDC write ->open_functionfs() ->configfs_write_iter() ->adb_open() ->gadget_dev_desc_UDC_store() ->adb_write() ->usb_gadget_register_driver_owner ->driver_register() ->StartMonitor() ->bus_add_driver() ->adb_read() ->gadget_bind_driver() ->configfs_composite_bind() ->usb_add_function() ->open_functionfs() ->ffs_func_bind() ->adb_open() ->functionfs_bind() state !=FFS_ACTIVE> The adb_open, adb_read, and adb_write operations are invoked from the daemon, but trying to bind the function is a process that is invoked by UDC write through configfs, which opens up the possibility of a race condition between the two paths. In this race scenario, the kernel panic occurs due to the WARN_ON from functionfs_bind when panic_on_warn is enabled. This commit fixes the kernel panic by removing the unnecessary WARN_ON. Kernel panic - not syncing: kernel: panic_on_warn set ... [ 14.542395] Call trace: [ 14.542464] ffs_func_bind+0x1c8/0x14a8 [ 14.542468] usb_add_function+0xcc/0x1f0 [ 14.542473] configfs_composite_bind+0x468/0x588 [ 14.542478] gadget_bind_driver+0x
osv:CVE-2024-57913
Kernel
Fixed versions: 5.4.290, 5.10.234, 5.15.177, 6.1.125, 6.6.72, 6.12.10
Complete source record
{
"id": "04f27e642cd232ff0b53acffc4b8cc593a61b4e29cda2398b9961a82366a40dd",
"url": "https://osv.dev/vulnerability/CVE-2024-57913",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "usb: gadget: f_fs: Remove WARN_ON in functionfs_bind",
"summary": "In the Linux kernel, the following vulnerability has been resolved: usb: gadget: f_fs: Remove WARN_ON in functionfs_bind This commit addresses an issue related to below kernel panic where panic_on_warn is enabled. It is caused by the unnecessary use of WARN_ON in functionsfs_bind, which easily leads to the following scenarios. 1.adb_write in adbd 2. UDC write via configfs ================= ===================== ->usb_ffs_open_thread() ->UDC write ->open_functionfs() ->configfs_write_iter() ->adb_open() ->gadget_dev_desc_UDC_store() ->adb_write() ->usb_gadget_register_driver_owner ->driver_register() ->StartMonitor() ->bus_add_driver() ->adb_read() ->gadget_bind_driver() ->configfs_composite_bind() ->usb_add_function() ->open_functionfs() ->ffs_func_bind() ->adb_open() ->functionfs_bind() state !=FFS_ACTIVE> The adb_open, adb_read, and adb_write operations are invoked from the daemon, but trying to bind the function is a process that is invoked by UDC write through configfs, which opens up the possibility of a race condition between the two paths. In this race scenario, the kernel panic occurs due to the WARN_ON from functionfs_bind when panic_on_warn is enabled. This commit fixes the kernel panic by removing the unnecessary WARN_ON. Kernel panic - not syncing: kernel: panic_on_warn set ... [ 14.542395] Call trace: [ 14.542464] ffs_func_bind+0x1c8/0x14a8 [ 14.542468] usb_add_function+0xcc/0x1f0 [ 14.542473] configfs_composite_bind+0x468/0x588 [ 14.542478] gadget_bind_driver+0x",
"evidence": "osv:CVE-2024-57913",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.290",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.234",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.177",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.125",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.72",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.10",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2024-57913",
"aliases": [
"CVE-2024-57913"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "ddf8abd2599491cbad959c700b90ba72a5dce8d0"
},
{
"fixed": "bfe60030fcd976e3546e1f73d6d0eb3fea26442e"
},
{
"fixed": "3e4d32cc145955d5c56c5498a3ff057e4aafa9d1"
},
{
"fixed": "19fc1c83454ca9d5699e39633ec79ce26355251c"
},
{
"fixed": "82f60f3600aecd9ffcd0fbc4e193694511c85b47"
},
{
"fixed": "ea6a1498742430eb2effce0d1439ff29ef37dd7d"
},
{
"fixed": "a8b6a18b9b66cc4c016d63132b59ce5383f7cdd2"
},
{
"fixed": "dfc51e48bca475bbee984e90f33fdc537ce09699"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57913.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.35"
},
{
"fixed": "5.4.290"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.234"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.177"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.125"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.72"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.10"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-57913.json"
}
}
],
"modified": "2026-10-28T02:30:28.306125633Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
"https://git.kernel.org/stable/c/19fc1c83454ca9d5699e39633ec79ce26355251c",
"https://git.kernel.org/stable/c/3e4d32cc145955d5c56c5498a3ff057e4aafa9d1",
"https://git.kernel.org/stable/c/82f60f3600aecd9ffcd0fbc4e193694511c85b47",
"https://git.kernel.org/stable/c/a8b6a18b9b66cc4c016d63132b59ce5383f7cdd2",
"https://git.kernel.org/stable/c/bfe60030fcd976e3546e1f73d6d0eb3fea26442e",
"https://git.kernel.org/stable/c/dfc51e48bca475bbee984e90f33fdc537ce09699",
"https://git.kernel.org/stable/c/ea6a1498742430eb2effce0d1439ff29ef37dd7d",
"https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html",
"https://lists.debian.org/debian-lts-announce/2025/03/msg00002.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57913.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-57913",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/57xxx/CVE-2024-57913.json"
}
},
"related_cves": [
{
"value": "CVE-2024-57913",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 494549,
"published_at": "2025-01-19T11:52:35.149+00:00"
}