In the Linux kernel, the following vulnerability has been resolved:
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
Submitting a cs with 0 chunks, causes an oops later, found trying to execute the wrong userspace driver.
MESALOADERDRIVER_OVERRIDE=v3d glxinfo
[172536.665184] BUG: kernel NULL pointer dereference, address: 00000000000001d8 [172536.665188] #PF: supervisor read access in kernel mode [172536.665189] #PF: errorcode(0x0000) - not-present page [172536.665191] PGD 6712a0067 P4D 6712a0067 PUD 5af9ff067 PMD 0 [172536.665195] Oops: 0000 [#1] SMP NOPTI [172536.665197] CPU: 7 PID: 2769838 Comm: glxinfo Tainted: P O 5.10.81 #1-NixOS [172536.665199] Hardware name: To be filled by O.E.M. To be filled by O.E.M./CROSSHAIR V FORMULA-Z, BIOS 2201 03/23/2015 [172536.665272] RIP: 0010:amdgpucsioctl+0x96/0x1ce0 [amdgpu] [172536.665274] Code: 75 18 00 00 4c 8b b2 88 00 00 00 8b 46 08 48 89 54 24 68 49 89 f7 4c 89 5c 24 60 31 d2 4c 89 74 24 30 85 c0 0f 85 c0 01 00 00 <48> 83 ba d8 01 00 00 00 48 8b b4 24 90 00 00 00 74 16 48 8b 46 10 [172536.665276] RSP: 0018:ffffb47c0e81bbe0 EFLAGS: 00010246 [172536.665277] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [172536.665278] RDX: 0000000000000000 RSI: ffffb47c0e81be28 RDI: ffffb47c0e81bd68 [172536.665279] RBP: ffff936524080010 R08: 0000000000000000 R09: ffffb47c0e81be38 [172536.665281] R10: ffff936524080010 R11: ffff936524080000 R12: ffffb47c0e81bc40 [172536.665282] R13: ffffb47c0e81be28 R14: ffff9367bc410000 R15: ffffb47c0e81be28 [172536.665283] FS: 00007fe35e05d740(0000) GS:ffff936c1edc0000(0000) knlGS:0000000000000000 [172536.665284] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [172536.665286] CR2: 00000000000001d8 CR3: 0000000532e46000 CR4: 00000000000406e0 [172536.665287] Call Trace: [172536.665322] ? amdgpucsfindmapping+0x110/0x110 [amdgpu] [172536.665332] drmioctlkernel+0xaa/0xf0 [drm] [172536.665338] drmioctl+0x201/0x3b0 [drm] [172536.665369] ? amdgpucsfindmapping+0x110/0x110 [amdgpu] [172536.665372] ? selinuxfileioctl+0x135/0x230 [172536.665399] amdgpudrmioctl+0x49/0x80 [amdgpu] [172536.665403] _x64sysioctl+0x83/0xb0 [172536.665406] dosyscall64+0x33/0x40 [172536.665409] entrySYSCALL64after_hwframe+0x44/0xa9
Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2018
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be585921f29df5422a39c952d188b418ad48ffab",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-0110b0a2",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"235082976030365577663251286387314394090",
"129662957290281388693704083476370233842",
"134766688867110709968104338956066776377"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@20b947e5a3c74c5084d661c097517a554989d462",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-0323bc09",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"206082633183293481004767622396612802157",
"102984285611879798988924195829700462778",
"160493428177688989864415086753020873492"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8189f44270db1be78169e11eec51a3eeb980bc63",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-03d11da0",
"signature_type": "Function",
"digest": {
"function_hash": "21663763768836409786530951657730408996",
"length": 2626.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa25acbe96692e4bf8482311c293f72d8c6034c0",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-0a919252",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"235082976030365577663251286387314394090",
"129662957290281388693704083476370233842",
"134766688867110709968104338956066776377"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@31ab27b14daaa75541a415c6794d6f3567fea44a",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-10ed4d0c",
"signature_type": "Function",
"digest": {
"function_hash": "34732118542576181165645331201563372392",
"length": 3309.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8189f44270db1be78169e11eec51a3eeb980bc63",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-1d79603c",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"235082976030365577663251286387314394090",
"129662957290281388693704083476370233842",
"134766688867110709968104338956066776377"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@be585921f29df5422a39c952d188b418ad48ffab",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-3fe2c313",
"signature_type": "Function",
"digest": {
"function_hash": "34732118542576181165645331201563372392",
"length": 3309.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c12984cdb077b9042d2dc20ca18cb16a87bcc774",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-5d5008bd",
"signature_type": "Function",
"digest": {
"function_hash": "34732118542576181165645331201563372392",
"length": 3309.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c12984cdb077b9042d2dc20ca18cb16a87bcc774",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-5ecd645a",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"235082976030365577663251286387314394090",
"129662957290281388693704083476370233842",
"134766688867110709968104338956066776377"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@70276460e914d560e96bfc208695a872fe9469c9",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-6a9845b9",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"206082633183293481004767622396612802157",
"102984285611879798988924195829700462778",
"160493428177688989864415086753020873492"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15c3bcc9b5349d40207e5f8d4d799b8b4b7d13b8",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-6e9322dc",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"235082976030365577663251286387314394090",
"129662957290281388693704083476370233842",
"134766688867110709968104338956066776377"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aa25acbe96692e4bf8482311c293f72d8c6034c0",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-7b7b23bd",
"signature_type": "Function",
"digest": {
"function_hash": "87654731332002866453948417729795853584",
"length": 2657.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7086a23890d255bb5761604e39174b20d06231a4",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-8a282b54",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"206082633183293481004767622396612802157",
"102984285611879798988924195829700462778",
"160493428177688989864415086753020873492"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15c3bcc9b5349d40207e5f8d4d799b8b4b7d13b8",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-9baf6db3",
"signature_type": "Function",
"digest": {
"function_hash": "52192187043440309348443336150301101604",
"length": 3168.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@20b947e5a3c74c5084d661c097517a554989d462",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-9dffa79f",
"signature_type": "Function",
"digest": {
"function_hash": "34732118542576181165645331201563372392",
"length": 3309.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7086a23890d255bb5761604e39174b20d06231a4",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-a52580e6",
"signature_type": "Function",
"digest": {
"function_hash": "34732118542576181165645331201563372392",
"length": 3309.0
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@31ab27b14daaa75541a415c6794d6f3567fea44a",
"target": {
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-c354f89e",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"318306647489885457432417337049420272654",
"206082633183293481004767622396612802157",
"102984285611879798988924195829700462778",
"160493428177688989864415086753020873492"
]
},
"deprecated": false,
"signature_version": "v1"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@70276460e914d560e96bfc208695a872fe9469c9",
"target": {
"function": "amdgpu_cs_parser_init",
"file": "drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c"
},
"id": "CVE-2022-49335-caf8c06a",
"signature_type": "Function",
"digest": {
"function_hash": "34732118542576181165645331201563372392",
"length": 3309.0
},
"deprecated": false,
"signature_version": "v1"
}
]