In the Linux kernel, the following vulnerability has been resolved:
net: fec: handle pagepooldevallocpages error
The fecenetupdatecbd function calls pagepooldevallocpages but did not handle the case when it returned NULL. There was a WARNON(!new_page) but it would still proceed to use the NULL pointer and then crash.
This case does seem somewhat rare but when the system is under memory pressure it can happen. One case where I can duplicate this with some frequency is when writing over a smbd share to a SATA HDD attached to an imx6q.
Setting /proc/sys/vm/minfreekbytes to higher values also seems to solve the problem for my test case. But it still seems wrong that the fec driver ignores the memory allocation error and can crash.
This commit handles the allocation error by dropping the current packet.
[
{
"signature_type": "Function",
"digest": {
"length": 363.0,
"function_hash": "7749777133475998964386739253744550040"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1425cb829556398f594658512d49292f988a2ab0",
"target": {
"function": "fec_enet_update_cbd",
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-0ceb169b",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"length": 363.0,
"function_hash": "7749777133475998964386739253744550040"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@001ba0902046cb6c352494df610718c0763e77a5",
"target": {
"function": "fec_enet_update_cbd",
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-55da6956",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"line_hashes": [
"221188426531609981257057636268977209384",
"209293702893879304035381975629192151526",
"122475002864465838417379903742586104810",
"162555831841535730966980273712570097233",
"268561488041201943808867196010178237750",
"131569075787751979760382706868867397118",
"223105558445088846203890450538535935546",
"250625841174791218127904343390094616562",
"268612300056363513559659272472262297283",
"73865715454030876277079393262315979238",
"189473521850405178344791239575904247506",
"19340920041844345660131146987334311654",
"306151789122457189754159609101093529119",
"122365196555427928163818094383536048453",
"38412837797007295091142427716408072418",
"290542957722556770549922031642926389522",
"279979993719057048007904059631278121540",
"37524803856579966983468490835911808570",
"283110260814916595341088177033225471511",
"246519915883716809289549058296045801222",
"23978790907085694034887008969592051708",
"93665948141353386519229540171621949593",
"29799706601451400677312817156918208967",
"208494121320447258271152312031805137867",
"263150557029917890610122206970669748351",
"12650842090908885168587044558956068366",
"205137851507384761166805063084137809926",
"298287765154795686857485143713237372225"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@001ba0902046cb6c352494df610718c0763e77a5",
"target": {
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-6cb9749a",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"length": 3956.0,
"function_hash": "33309732353199135227354387880912580627"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1425cb829556398f594658512d49292f988a2ab0",
"target": {
"function": "fec_enet_rx_queue",
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-749ce6c3",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"length": 3905.0,
"function_hash": "45934397284333173109636241716937462588"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a0097db0544b658c159ac787319737712063a23",
"target": {
"function": "fec_enet_rx_queue",
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-7da8c0e1",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"length": 363.0,
"function_hash": "7749777133475998964386739253744550040"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a0097db0544b658c159ac787319737712063a23",
"target": {
"function": "fec_enet_update_cbd",
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-a8dabe90",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"line_hashes": [
"221188426531609981257057636268977209384",
"209293702893879304035381975629192151526",
"122475002864465838417379903742586104810",
"162555831841535730966980273712570097233",
"268561488041201943808867196010178237750",
"131569075787751979760382706868867397118",
"223105558445088846203890450538535935546",
"250625841174791218127904343390094616562",
"268612300056363513559659272472262297283",
"73865715454030876277079393262315979238",
"189473521850405178344791239575904247506",
"19340920041844345660131146987334311654",
"306151789122457189754159609101093529119",
"122365196555427928163818094383536048453",
"38412837797007295091142427716408072418",
"290542957722556770549922031642926389522",
"279979993719057048007904059631278121540",
"37524803856579966983468490835911808570",
"283110260814916595341088177033225471511",
"246519915883716809289549058296045801222",
"23978790907085694034887008969592051708",
"93665948141353386519229540171621949593",
"29799706601451400677312817156918208967",
"208494121320447258271152312031805137867",
"263150557029917890610122206970669748351",
"12650842090908885168587044558956068366",
"205137851507384761166805063084137809926",
"298287765154795686857485143713237372225"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8a0097db0544b658c159ac787319737712063a23",
"target": {
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-b73156c5",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Function",
"digest": {
"length": 3956.0,
"function_hash": "33309732353199135227354387880912580627"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@001ba0902046cb6c352494df610718c0763e77a5",
"target": {
"function": "fec_enet_rx_queue",
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-f0ba18ce",
"signature_version": "v1",
"deprecated": false
},
{
"signature_type": "Line",
"digest": {
"line_hashes": [
"221188426531609981257057636268977209384",
"209293702893879304035381975629192151526",
"122475002864465838417379903742586104810",
"162555831841535730966980273712570097233",
"268561488041201943808867196010178237750",
"131569075787751979760382706868867397118",
"223105558445088846203890450538535935546",
"250625841174791218127904343390094616562",
"268612300056363513559659272472262297283",
"73865715454030876277079393262315979238",
"189473521850405178344791239575904247506",
"19340920041844345660131146987334311654",
"306151789122457189754159609101093529119",
"122365196555427928163818094383536048453",
"38412837797007295091142427716408072418",
"290542957722556770549922031642926389522",
"279979993719057048007904059631278121540",
"37524803856579966983468490835911808570",
"283110260814916595341088177033225471511",
"246519915883716809289549058296045801222",
"23978790907085694034887008969592051708",
"93665948141353386519229540171621949593",
"29799706601451400677312817156918208967",
"208494121320447258271152312031805137867",
"263150557029917890610122206970669748351",
"12650842090908885168587044558956068366",
"205137851507384761166805063084137809926",
"298287765154795686857485143713237372225"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1425cb829556398f594658512d49292f988a2ab0",
"target": {
"file": "drivers/net/ethernet/freescale/fec_main.c"
},
"id": "CVE-2025-21676-f9e479d2",
"signature_version": "v1",
"deprecated": false
}
]