In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Fix crash when rebind ccp device for ccp.ko
When CONFIGCRYPTODEVCCPDEBUGFS is enabled, rebinding the ccp device causes the following crash:
$ echo '0000:0a:00.2' > /sys/bus/pci/drivers/ccp/unbind $ echo '0000:0a:00.2' > /sys/bus/pci/drivers/ccp/bind
[ 204.976930] BUG: kernel NULL pointer dereference, address: 0000000000000098 [ 204.978026] #PF: supervisor write access in kernel mode [ 204.979126] #PF: errorcode(0x0002) - not-present page [ 204.980226] PGD 0 P4D 0 [ 204.981317] Oops: Oops: 0002 [#1] SMP NOPTI ... [ 204.997852] Call Trace: [ 204.999074] <TASK> [ 205.000297] startcreating+0x9f/0x1c0 [ 205.001533] debugfscreatedir+0x1f/0x170 [ 205.002769] ? srsoreturnthunk+0x5/0x5f [ 205.004000] ccp5debugfssetup+0x87/0x170 [ccp] [ 205.005241] ccp5init+0x8b2/0x960 [ccp] [ 205.006469] ccpdevinit+0xd4/0x150 [ccp] [ 205.007709] spinit+0x5f/0x80 [ccp] [ 205.008942] sppciprobe+0x283/0x2e0 [ccp] [ 205.010165] ? srsoreturnthunk+0x5/0x5f [ 205.011376] localpciprobe+0x4f/0xb0 [ 205.012584] pcideviceprobe+0xdb/0x230 [ 205.013810] reallyprobe+0xed/0x380 [ 205.015024] _driverprobedevice+0x7e/0x160 [ 205.016240] devicedriverattach+0x2f/0x60 [ 205.017457] bindstore+0x7c/0xb0 [ 205.018663] drvattrstore+0x28/0x40 [ 205.019868] sysfskfwrite+0x5f/0x70 [ 205.021065] kernfsfopwriteiter+0x145/0x1d0 [ 205.022267] vfswrite+0x308/0x440 [ 205.023453] ksyswrite+0x6d/0xe0 [ 205.024616] _x64syswrite+0x1e/0x30 [ 205.025778] x64syscall+0x16ba/0x2150 [ 205.026942] dosyscall64+0x56/0x1e0 [ 205.028108] entrySYSCALL64after_hwframe+0x76/0x7e [ 205.029276] RIP: 0033:0x7fbc36f10104 [ 205.030420] Code: 89 02 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 8d 05 e1 08 2e 00 8b 00 85 c0 75 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 f3 c3 66 90 41 54 55 49 89 d4 53 48 89 f5
This patch sets ccpdebugfsdir to NULL after destroying it in ccp5debugfsdestroy, allowing the directory dentry to be recreated when rebinding the ccp device.
Tested on AMD Ryzen 7 1700X.
[
{
"id": "CVE-2025-38581-069f05c8",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9dea08eac4f6d6fbbae59992978252e2edab995d"
},
{
"id": "CVE-2025-38581-2299b2d0",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64ec9a7e7a6398b172ab6feba60e952163a1c3d5"
},
{
"id": "CVE-2025-38581-27acb2a0",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2d4060f05e74dbee884ba723f6afd9282befc3c5"
},
{
"id": "CVE-2025-38581-28c3c254",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@20c0ed8dd65834e6bab464f54cd6ff68659bacb9"
},
{
"id": "CVE-2025-38581-2af45a2c",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a25ab6dfa0ce323ec308966988be6b675eb9d3e5"
},
{
"id": "CVE-2025-38581-3d6a000c",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a25ab6dfa0ce323ec308966988be6b675eb9d3e5"
},
{
"id": "CVE-2025-38581-3d6ab0b8",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6eadf50c1d894cb34f3237064063207460946040"
},
{
"id": "CVE-2025-38581-68f8e18c",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@db111468531777cac8b4beb6515a88a54b0c4a74"
},
{
"id": "CVE-2025-38581-6f591ea7",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6eadf50c1d894cb34f3237064063207460946040"
},
{
"id": "CVE-2025-38581-8fb664eb",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ce63a83925964ab7564bd216bd92b80bc365492e"
},
{
"id": "CVE-2025-38581-9c3b67ff",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2d4060f05e74dbee884ba723f6afd9282befc3c5"
},
{
"id": "CVE-2025-38581-a8338f76",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9dea08eac4f6d6fbbae59992978252e2edab995d"
},
{
"id": "CVE-2025-38581-b35a4571",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@20c0ed8dd65834e6bab464f54cd6ff68659bacb9"
},
{
"id": "CVE-2025-38581-cc93585e",
"target": {
"function": "ccp5_debugfs_destroy",
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 59.0,
"function_hash": "111513240982199151118278954330457869942"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ce63a83925964ab7564bd216bd92b80bc365492e"
},
{
"id": "CVE-2025-38581-cf6fc056",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@db111468531777cac8b4beb6515a88a54b0c4a74"
},
{
"id": "CVE-2025-38581-ef032e02",
"target": {
"file": "drivers/crypto/ccp/ccp-debugfs.c"
},
"signature_version": "v1",
"signature_type": "Line",
"deprecated": false,
"digest": {
"line_hashes": [
"263565959432141746551194654326460435953",
"102979519770753945658534018857864785971",
"219338054214319677564285549702049024338"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64ec9a7e7a6398b172ab6feba60e952163a1c3d5"
}
]