tomoyo: don't emit warning in tomoyo_write_control()
In the Linux kernel, the following vulnerability has been resolved: tomoyo: don't emit warning in tomoyo_write_control() syzbot is reporting too large allocation warning at tomoyo_write_control(), for one can write a very very long line without new line character. To fix this warning, I use __GFP_NOWARN rather than checking for KMALLOC_MAX_SIZE, for practically a valid line should be always shorter than 32KB where the "too small to fail" memory-allocation rule applies. One might try to write a valid line that is longer than 32KB, but such request will likely fail with -ENOMEM. Therefore, I feel that separately returning -EINVAL when a line is longer than KMALLOC_MAX_SIZE is redundant. There is no need to distinguish over-32KB and over-KMALLOC_MAX_SIZE.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.235, 5.15.179, 5.4.291, 6.1.129, 6.12.14, 6.13.3, 6.6.78
- CVEs
- CVE-2024-58085
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 21:42 UTC · Revision 1
Source evidence
tomoyo: don't emit warning in tomoyo_write_control()
core-osv · Original sourcePublished 6 Mar 2025, 16:22 UTC
In the Linux kernel, the following vulnerability has been resolved: tomoyo: don't emit warning in tomoyo_write_control() syzbot is reporting too large allocation warning at tomoyo_write_control(), for one can write a very very long line without new line character. To fix this warning, I use __GFP_NOWARN rather than checking for KMALLOC_MAX_SIZE, for practically a valid line should be always shorter than 32KB where the "too small to fail" memory-allocation rule applies. One might try to write a valid line that is longer than 32KB, but such request will likely fail with -ENOMEM. Therefore, I feel that separately returning -EINVAL when a line is longer than KMALLOC_MAX_SIZE is redundant. There is no need to distinguish over-32KB and over-KMALLOC_MAX_SIZE.
osv:CVE-2024-58085
Kernel
Fixed versions: 5.4.291, 5.10.235, 5.15.179, 6.1.129, 6.6.78, 6.12.14, 6.13.3
Complete source record
{
"id": "b62af96f69133c90eebb274f9f3e9da76b90840d4d193b66b7ba7fae5e4857ef",
"url": "https://osv.dev/vulnerability/CVE-2024-58085",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "tomoyo: don't emit warning in tomoyo_write_control()",
"summary": "In the Linux kernel, the following vulnerability has been resolved: tomoyo: don't emit warning in tomoyo_write_control() syzbot is reporting too large allocation warning at tomoyo_write_control(), for one can write a very very long line without new line character. To fix this warning, I use __GFP_NOWARN rather than checking for KMALLOC_MAX_SIZE, for practically a valid line should be always shorter than 32KB where the \"too small to fail\" memory-allocation rule applies. One might try to write a valid line that is longer than 32KB, but such request will likely fail with -ENOMEM. Therefore, I feel that separately returning -EINVAL when a line is longer than KMALLOC_MAX_SIZE is redundant. There is no need to distinguish over-32KB and over-KMALLOC_MAX_SIZE.",
"evidence": "osv:CVE-2024-58085",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.4.291",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.235",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.179",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.129",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.78",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.14",
"evidence": "/affected/1/ranges"
},
{
"value": "6.13.3",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2024-58085",
"aliases": [
"CVE-2024-58085"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "bd03a3e4c9a9df0c6b007045fa7fc8889111a478"
},
{
"fixed": "c67efabddc73171c7771d3ffe4ffa1e503ee533e"
},
{
"fixed": "f6b37b3e12de638753bce79a2858070b9c4a4ad3"
},
{
"fixed": "b2bd5857a0d6973ebbcb4d9831ddcaebbd257be1"
},
{
"fixed": "a01c200fa7eb59da4d2dbbb48b61f4a0d196c09f"
},
{
"fixed": "fe1c021eb03dae0dc9dce55e81f77a60e419a27a"
},
{
"fixed": "c9382f380e8d09209b8e5c0def0545852168be25"
},
{
"fixed": "414705c0303350d139b1dc18f329fe47dfb642dd"
},
{
"fixed": "3df7546fc03b8f004eee0b9e3256369f7d096685"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-58085.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "3.1.0"
},
{
"fixed": "5.4.291"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.235"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.179"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.129"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.78"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.14"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.13.3"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-58085.json"
}
}
],
"modified": "2026-10-28T02:30:40.162199023Z",
"provider": "osv",
"references": [
"https://cert-portal.siemens.com/productcert/html/ssa-265688.html",
"https://git.kernel.org/stable/c/3df7546fc03b8f004eee0b9e3256369f7d096685",
"https://git.kernel.org/stable/c/414705c0303350d139b1dc18f329fe47dfb642dd",
"https://git.kernel.org/stable/c/a01c200fa7eb59da4d2dbbb48b61f4a0d196c09f",
"https://git.kernel.org/stable/c/b2bd5857a0d6973ebbcb4d9831ddcaebbd257be1",
"https://git.kernel.org/stable/c/c67efabddc73171c7771d3ffe4ffa1e503ee533e",
"https://git.kernel.org/stable/c/c9382f380e8d09209b8e5c0def0545852168be25",
"https://git.kernel.org/stable/c/f6b37b3e12de638753bce79a2858070b9c4a4ad3",
"https://git.kernel.org/stable/c/fe1c021eb03dae0dc9dce55e81f77a60e419a27a",
"https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html",
"https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/58xxx/CVE-2024-58085.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-58085",
"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/58xxx/CVE-2024-58085.json"
}
},
"related_cves": [
{
"value": "CVE-2024-58085",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 507420,
"published_at": "2025-03-06T16:22:32.761+00:00"
}