In the Linux kernel, the following vulnerability has been resolved:
f2fs: avoid format-overflow warning
With gcc and W=1 option, there's a warning like this:
fs/f2fs/compress.c: In function ‘f2fsinitpagearraycache’: fs/f2fs/compress.c:1984:47: error: ‘%u’ directive writing between 1 and 7 bytes into a region of size between 5 and 8 [-Werror=format-overflow=] 1984 | sprintf(slabname, "f2fspagearrayentry-%u:%u", MAJOR(dev), MINOR(dev)); | ^~
String "f2fspagearrayentry-%u:%u" can up to 35. The first "%u" can up to 4 and the second "%u" can up to 7, so total size is "24 + 4 + 7 = 35". slabname's size should be 35 rather than 32.
[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e4088d7d8f1123006d46a42edf51b8c960a58ef9",
"deprecated": false,
"id": "CVE-2023-52748-12309f7a",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"247912144013577806022427599403157645884",
"237494161613633797406390599154985197289",
"146577438358033254455844629384535026973",
"214715976480481796729195440783424420449"
]
},
"target": {
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3eebe636cac53886bd5d1cdd55e082ec9e84983f",
"deprecated": false,
"id": "CVE-2023-52748-16bad5b8",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"247912144013577806022427599403157645884",
"310900334652055149517531114671396459179",
"21088700893318139372631409970663658820",
"27779072941031276132237925190092946402"
]
},
"target": {
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fca08fd3085253b48fcb1bd243a0a5e18821a00",
"deprecated": false,
"id": "CVE-2023-52748-19c95b67",
"signature_type": "Function",
"digest": {
"length": 451.0,
"function_hash": "3508175092724261440763695936792429736"
},
"target": {
"function": "f2fs_init_page_array_cache",
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fca08fd3085253b48fcb1bd243a0a5e18821a00",
"deprecated": false,
"id": "CVE-2023-52748-4c4d0e61",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"247912144013577806022427599403157645884",
"310900334652055149517531114671396459179",
"21088700893318139372631409970663658820",
"27779072941031276132237925190092946402"
]
},
"target": {
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0d4e8acb3789c5a8651061fbab62ca24a45c063",
"deprecated": false,
"id": "CVE-2023-52748-56da3dd5",
"signature_type": "Function",
"digest": {
"length": 451.0,
"function_hash": "3508175092724261440763695936792429736"
},
"target": {
"function": "f2fs_init_page_array_cache",
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c041f5ddef00c731c541e00bc8ae97b8c84c682f",
"deprecated": false,
"id": "CVE-2023-52748-7cbaa28f",
"signature_type": "Function",
"digest": {
"length": 426.0,
"function_hash": "322096540735581271986718494830984822585"
},
"target": {
"function": "f2fs_init_page_array_cache",
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@526dd7540a09ecf87b5f54f3ab4e0a2528f25a79",
"deprecated": false,
"id": "CVE-2023-52748-7d71333d",
"signature_type": "Function",
"digest": {
"length": 465.0,
"function_hash": "53322768661085006907734683607020399842"
},
"target": {
"function": "f2fs_init_page_array_cache",
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@526dd7540a09ecf87b5f54f3ab4e0a2528f25a79",
"deprecated": false,
"id": "CVE-2023-52748-caa5a124",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"247912144013577806022427599403157645884",
"310900334652055149517531114671396459179",
"21088700893318139372631409970663658820",
"27779072941031276132237925190092946402"
]
},
"target": {
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c041f5ddef00c731c541e00bc8ae97b8c84c682f",
"deprecated": false,
"id": "CVE-2023-52748-cd69bdf8",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"247912144013577806022427599403157645884",
"237494161613633797406390599154985197289",
"146577438358033254455844629384535026973",
"214715976480481796729195440783424420449"
]
},
"target": {
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e4088d7d8f1123006d46a42edf51b8c960a58ef9",
"deprecated": false,
"id": "CVE-2023-52748-d7d4c62c",
"signature_type": "Function",
"digest": {
"length": 426.0,
"function_hash": "322096540735581271986718494830984822585"
},
"target": {
"function": "f2fs_init_page_array_cache",
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0d4e8acb3789c5a8651061fbab62ca24a45c063",
"deprecated": false,
"id": "CVE-2023-52748-f7069715",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"247912144013577806022427599403157645884",
"310900334652055149517531114671396459179",
"21088700893318139372631409970663658820",
"27779072941031276132237925190092946402"
]
},
"target": {
"file": "fs/f2fs/compress.c"
}
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3eebe636cac53886bd5d1cdd55e082ec9e84983f",
"deprecated": false,
"id": "CVE-2023-52748-f8ec4fd6",
"signature_type": "Function",
"digest": {
"length": 451.0,
"function_hash": "3508175092724261440763695936792429736"
},
"target": {
"function": "f2fs_init_page_array_cache",
"file": "fs/f2fs/compress.c"
}
}
]