In the Linux kernel, the following vulnerability has been resolved:
net: atlantic: Fix DMA mapping for PTP hwts ring
Function aqringhwtsrxalloc() maps extra AQCFGRXDSDEF bytes for PTP HWTS ring but then generic aqring_free() does not take this into account. Create and use a specific function to free HWTS ring to fix this issue.
Trace: [ 215.351607] ------------[ cut here ]------------ [ 215.351612] DMA-API: atlantic 0000:4b:00.0: device driver frees DMA memory with different size [device address=0x00000000fbdd0000] [map size=34816 bytes] [unmap size=32768 bytes] [ 215.351635] WARNING: CPU: 33 PID: 10759 at kernel/dma/debug.c:988 checkunmap+0xa6f/0x2360 ... [ 215.581176] Call Trace: [ 215.583632] <TASK> [ 215.585745] ? showtraceloglvl+0x1c4/0x2df [ 215.590114] ? showtraceloglvl+0x1c4/0x2df [ 215.594497] ? debugdmafreecoherent+0x196/0x210 [ 215.599305] ? checkunmap+0xa6f/0x2360 [ 215.603147] ? _warn+0xca/0x1d0 [ 215.606391] ? checkunmap+0xa6f/0x2360 [ 215.610237] ? reportbug+0x1ef/0x370 [ 215.613921] ? handlebug+0x3c/0x70 [ 215.617423] ? excinvalidop+0x14/0x50 [ 215.621269] ? asmexcinvalidop+0x16/0x20 [ 215.625480] ? checkunmap+0xa6f/0x2360 [ 215.629331] ? marklock.part.0+0xca/0xa40 [ 215.633445] debugdmafreecoherent+0x196/0x210 [ 215.638079] ? _pfxdebugdmafreecoherent+0x10/0x10 [ 215.643242] ? slabfreefreelisthook+0x11d/0x1d0 [ 215.648060] dmafreeattrs+0x6d/0x130 [ 215.651834] aqringfree+0x193/0x290 [atlantic] [ 215.656487] aqptpringfree+0x67/0x110 [atlantic] ... [ 216.127540] ---[ end trace 6467e5964dd2640b ]--- [ 216.132160] DMA-API: Mapped at: [ 216.132162] debugdmaalloccoherent+0x66/0x2f0 [ 216.132165] dmaallocattrs+0xf5/0x1b0 [ 216.132168] aqringhwtsrxalloc+0x150/0x1f0 [atlantic] [ 216.132193] aqptpringalloc+0x1bb/0x540 [atlantic] [ 216.132213] aqnicinit+0x4a1/0x760 [atlantic]
{ "vanir_signatures": [ { "id": "CVE-2024-26680-04d67816", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ptp.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e42e334c645575be5432adee224975d4f536fdb1", "digest": { "threshold": 0.9, "line_hashes": [ "246409467698268165485219931923210396466", "17325277071480142766265898768352433590", "135033191428097522845044111333645521529", "136464354233371926168001635914762495137", "160991894669296145776645397856674216848", "298438346631441423915100739342849084624", "165778678520891010716786695012022914962", "339771479419571658333562551818545642646" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-0772eff2", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ring.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2e7d3b67630dfd8f178c41fa2217aa00e79a5887", "digest": { "threshold": 0.9, "line_hashes": [ "156277942907412253015844585243226596476", "32670839205985476295948886969816953094", "217040222712045531647130417575786316760", "330922856251630450392748409050172623091" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-20722df7", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ptp.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2e7d3b67630dfd8f178c41fa2217aa00e79a5887", "digest": { "threshold": 0.9, "line_hashes": [ "246409467698268165485219931923210396466", "17325277071480142766265898768352433590", "135033191428097522845044111333645521529", "136464354233371926168001635914762495137", "160991894669296145776645397856674216848", "298438346631441423915100739342849084624", "165778678520891010716786695012022914962", "339771479419571658333562551818545642646" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-78d1e089", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ptp.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@466ceebe48cbba3f4506f165fca7111f9eb8bb12", "digest": { "threshold": 0.9, "line_hashes": [ "246409467698268165485219931923210396466", "17325277071480142766265898768352433590", "135033191428097522845044111333645521529", "136464354233371926168001635914762495137", "160991894669296145776645397856674216848", "298438346631441423915100739342849084624", "165778678520891010716786695012022914962", "339771479419571658333562551818545642646" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-9ba96279", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ring.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@466ceebe48cbba3f4506f165fca7111f9eb8bb12", "digest": { "threshold": 0.9, "line_hashes": [ "156277942907412253015844585243226596476", "32670839205985476295948886969816953094", "217040222712045531647130417575786316760", "330922856251630450392748409050172623091" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-c70b3716", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ring.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@004fe5b7f59286a926a45e0cafc7870e9cdddd56", "digest": { "threshold": 0.9, "line_hashes": [ "156277942907412253015844585243226596476", "32670839205985476295948886969816953094", "217040222712045531647130417575786316760", "330922856251630450392748409050172623091" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-e23b8411", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ptp.c" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@004fe5b7f59286a926a45e0cafc7870e9cdddd56", "digest": { "threshold": 0.9, "line_hashes": [ "246409467698268165485219931923210396466", "17325277071480142766265898768352433590", "135033191428097522845044111333645521529", "136464354233371926168001635914762495137", "160991894669296145776645397856674216848", "298438346631441423915100739342849084624", "165778678520891010716786695012022914962", "339771479419571658333562551818545642646" ] }, "deprecated": false, "signature_version": "v1" }, { "id": "CVE-2024-26680-f29e764b", "signature_type": "Line", "target": { "file": "drivers/net/ethernet/aquantia/atlantic/aq_ring.h" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e42e334c645575be5432adee224975d4f536fdb1", "digest": { "threshold": 0.9, "line_hashes": [ "156277942907412253015844585243226596476", "32670839205985476295948886969816953094", "217040222712045531647130417575786316760", "330922856251630450392748409050172623091" ] }, "deprecated": false, "signature_version": "v1" } ] }