In the Linux kernel, the following vulnerability has been resolved:
net: phy: leds: fix memory leak
A network restart test on a router led to an out-of-memory condition, which was traced to a memory leak in the PHY LED trigger code.
The root cause is misuse of the devm API. The registration function (phyledtriggersregister) is called from phyattachdirect, not phyprobe, and the unregister function (phyledtriggersunregister) is called from phydetach, not phy_remove. This means the register and unregister functions can be called multiple times for the same PHY device, but devm-allocated memory is not freed until the driver is unbound.
This also prevents kmemleak from detecting the leak, as the devm API internally stores the allocated pointer.
Fix this by replacing devmkzalloc/devmkcalloc with standard kzalloc/kcalloc, and add the corresponding kfree calls in the unregister path.
[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"222440102486669269786301082155082620436",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-09c62900",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b7f0ee992adf601aa00c252418266177eb7ac2bc",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-17b045a8",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@618541a6cc1511064dfa58c89b3445e21844092f",
"deprecated": false
},
{
"digest": {
"length": 1355.0,
"function_hash": "74713965181766815884440299166791291246"
},
"signature_type": "Function",
"id": "CVE-2025-37989-29c8f33a",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f3d5880800f962c347777c4f8358f29f5fc403c",
"deprecated": false
},
{
"digest": {
"length": 1355.0,
"function_hash": "74713965181766815884440299166791291246"
},
"signature_type": "Function",
"id": "CVE-2025-37989-3378d796",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41f097f68a33d392579885426d0734a81219501",
"deprecated": false
},
{
"digest": {
"length": 1355.0,
"function_hash": "74713965181766815884440299166791291246"
},
"signature_type": "Function",
"id": "CVE-2025-37989-340ffefe",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@618541a6cc1511064dfa58c89b3445e21844092f",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-37edfc42",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b7f0ee992adf601aa00c252418266177eb7ac2bc",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"222440102486669269786301082155082620436",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-471a6ece",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f3d5880800f962c347777c4f8358f29f5fc403c",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"222440102486669269786301082155082620436",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-5105cb63",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@618541a6cc1511064dfa58c89b3445e21844092f",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"222440102486669269786301082155082620436",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-523d3b81",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@663c3da86e807c6c07ed48f911c7526fad6fe1ff",
"deprecated": false
},
{
"digest": {
"length": 1355.0,
"function_hash": "74713965181766815884440299166791291246"
},
"signature_type": "Function",
"id": "CVE-2025-37989-527b51c3",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41143e71052a00d654c15dc924fda50c1e7357d0",
"deprecated": false
},
{
"digest": {
"length": 1355.0,
"function_hash": "74713965181766815884440299166791291246"
},
"signature_type": "Function",
"id": "CVE-2025-37989-5b654c70",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b7f0ee992adf601aa00c252418266177eb7ac2bc",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-62ee2d18",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41f097f68a33d392579885426d0734a81219501",
"deprecated": false
},
{
"digest": {
"length": 1355.0,
"function_hash": "74713965181766815884440299166791291246"
},
"signature_type": "Function",
"id": "CVE-2025-37989-675d5a6c",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@663c3da86e807c6c07ed48f911c7526fad6fe1ff",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-688dfdad",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@663c3da86e807c6c07ed48f911c7526fad6fe1ff",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"222440102486669269786301082155082620436",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-790893f8",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f41f097f68a33d392579885426d0734a81219501",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-85a90e73",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@7f3d5880800f962c347777c4f8358f29f5fc403c",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-8915b120",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41143e71052a00d654c15dc924fda50c1e7357d0",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"222440102486669269786301082155082620436",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-92f7f8e3",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@41143e71052a00d654c15dc924fda50c1e7357d0",
"deprecated": false
},
{
"digest": {
"length": 1515.0,
"function_hash": "139329596294793321709404345213968453589"
},
"signature_type": "Function",
"id": "CVE-2025-37989-aa65b46b",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@966d6494e2ed9be9052fcd9815afba830896aaf8",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"289380006936201368957985569739556870177",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-d9936452",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95bed65cc0eb2a610550abf849a8b94374da80a7",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-dd98878c",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@966d6494e2ed9be9052fcd9815afba830896aaf8",
"deprecated": false
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"135083201422963775373311068757867969839",
"183180451216128857817171694879623536180",
"38353143804419763777939606212136856991",
"299779366402554526662105905088239982545",
"2166773573844047576088627599043234978",
"145338831401348959553115487548136019062",
"289380006936201368957985569739556870177",
"219895620717540296052888506867520190141",
"103758453234612614495450174673222230484",
"18170465336162252015689849552847978120",
"89363216158372822282558774960932125687",
"15998778017867017807783735762226690148",
"316156499134740313847238217058061579511",
"231780624356349667915577621782767807340",
"106168136217689700862920295698022937308",
"316704613242205665731503927445892117435",
"168535040651695509570802852616712469301",
"186777135595567147082095399807957744255",
"257341569551917002208441953477983634713",
"64865224706958109637268924748236271825",
"133247928138708222031068501191167844214",
"265721844300843742484460275243413858703",
"223354239084125754417071923924724703928",
"33069037080902979878438050198079192930",
"32781294372926434263412859688383027858",
"209733118125885179577522418120691548190"
]
},
"signature_type": "Line",
"id": "CVE-2025-37989-e5f1260e",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@966d6494e2ed9be9052fcd9815afba830896aaf8",
"deprecated": false
},
{
"digest": {
"length": 236.0,
"function_hash": "293227931855406430426599193280711265435"
},
"signature_type": "Function",
"id": "CVE-2025-37989-eea51f11",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_unregister"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95bed65cc0eb2a610550abf849a8b94374da80a7",
"deprecated": false
},
{
"digest": {
"length": 1515.0,
"function_hash": "139329596294793321709404345213968453589"
},
"signature_type": "Function",
"id": "CVE-2025-37989-f70239e6",
"target": {
"file": "drivers/net/phy/phy_led_triggers.c",
"function": "phy_led_triggers_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95bed65cc0eb2a610550abf849a8b94374da80a7",
"deprecated": false
}
]