In the Linux kernel, the following vulnerability has been resolved:
bpf: Add BPFPROGTYPECGROUPSKB attach type enforcement in BPFLINKCREATE
bpfprogattach uses attachtypetoprogtype to enforce proper attach type for BPFPROGTYPECGROUPSKB. linkcreate uses bpfprogget and relies on bpfprogattachcheckattachtype to properly verify progtype <> attachtype association.
Add missing attachtype enforcement for the linkcreate case. Otherwise, it's currently possible to attach cgroup_skb prog types to other cgroup hooks.
[
{
"signature_type": "Function",
"id": "CVE-2024-38564-04630372",
"target": {
"function": "bpf_prog_attach_check_attach_type",
"file": "kernel/bpf/syscall.c"
},
"digest": {
"function_hash": "294936011438696480310284337701446413029",
"length": 1437.0
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@67929e973f5a347f05fef064fea4ae79e7cdb5fd",
"deprecated": false
},
{
"signature_type": "Function",
"id": "CVE-2024-38564-53eb25fa",
"target": {
"function": "bpf_prog_attach_check_attach_type",
"file": "kernel/bpf/syscall.c"
},
"digest": {
"function_hash": "281177874041791869604630415900310692282",
"length": 1378.0
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6675c541f540a29487a802d3135280b69b9f568d",
"deprecated": false
},
{
"signature_type": "Line",
"id": "CVE-2024-38564-95a91df2",
"target": {
"file": "kernel/bpf/syscall.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"74172619154385478876608202981709040498",
"183765898721339404822397616194637332602",
"275567208005376926413895402625097641906",
"85987197896138574305970202143157904227"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6675c541f540a29487a802d3135280b69b9f568d",
"deprecated": false
},
{
"signature_type": "Function",
"id": "CVE-2024-38564-9cf0c665",
"target": {
"function": "bpf_prog_attach_check_attach_type",
"file": "kernel/bpf/syscall.c"
},
"digest": {
"function_hash": "29510205887827007174669578628716007035",
"length": 1461.0
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b34bbc76651065a5eafad8ddff1eb8d1f8473172",
"deprecated": false
},
{
"signature_type": "Line",
"id": "CVE-2024-38564-a6a95746",
"target": {
"file": "kernel/bpf/syscall.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"319342118362474736111748647364077406721",
"162591265303814915168418951409298796161",
"206429450761896363294680891293846249253",
"85987197896138574305970202143157904227"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@543576ec15b17c0c93301ac8297333c7b6e84ac7",
"deprecated": false
},
{
"signature_type": "Line",
"id": "CVE-2024-38564-c5b5e564",
"target": {
"file": "kernel/bpf/syscall.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"319342118362474736111748647364077406721",
"162591265303814915168418951409298796161",
"206429450761896363294680891293846249253",
"85987197896138574305970202143157904227"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b34bbc76651065a5eafad8ddff1eb8d1f8473172",
"deprecated": false
},
{
"signature_type": "Function",
"id": "CVE-2024-38564-d913495a",
"target": {
"function": "bpf_prog_attach_check_attach_type",
"file": "kernel/bpf/syscall.c"
},
"digest": {
"function_hash": "29510205887827007174669578628716007035",
"length": 1461.0
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@543576ec15b17c0c93301ac8297333c7b6e84ac7",
"deprecated": false
},
{
"signature_type": "Line",
"id": "CVE-2024-38564-de0bf818",
"target": {
"file": "kernel/bpf/syscall.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"74172619154385478876608202981709040498",
"183765898721339404822397616194637332602",
"275567208005376926413895402625097641906",
"85987197896138574305970202143157904227"
]
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@67929e973f5a347f05fef064fea4ae79e7cdb5fd",
"deprecated": false
}
]