In the Linux kernel, the following vulnerability has been resolved:
ptp: unregister virtual clocks when unregistering physical clock.
When unregistering a physical clock which has some virtual clocks, unregister the virtual clocks with it.
This fixes the following oops, which can be triggered by unloading a driver providing a PTP clock when it has enabled virtual clocks:
BUG: unable to handle page fault for address: ffffffffc04fc4d8 Oops: 0000 [#1] PREEMPT SMP NOPTI RIP: 0010:ptpvclockread+0x31/0xb0 Call Trace: timecounterread+0xf/0x50 ptpvclockrefresh+0x2c/0x50 ? ptpclockrelease+0x40/0x40 ptpauxkworker+0x17/0x30 kthreadworkerfn+0x9b/0x240 ? kthreadshouldpark+0x30/0x30 kthread+0xe2/0x110 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x22/0x30
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49229.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49229.json"
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bfcbb76b0f595ea9ede9f7a218086fef85242f10",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-0c8cca74",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"164084708168301479752907514237008366345",
"47268212966875325959201163756985769077",
"142751454002483810281057158963880527304",
"192335769708443185083616572430045817300",
"170233159827067646841670548507836305183",
"25387986173235581638078900653125359230",
"96348515980742032828783313235480349610",
"312219422415710947141140876092249662090"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9c796a57cbb5daf124a665689f0b2bc9262e0ced",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-25dd443e",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"164084708168301479752907514237008366345",
"47268212966875325959201163756985769077",
"142751454002483810281057158963880527304",
"192335769708443185083616572430045817300",
"170233159827067646841670548507836305183",
"25387986173235581638078900653125359230",
"96348515980742032828783313235480349610",
"312219422415710947141140876092249662090"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9c796a57cbb5daf124a665689f0b2bc9262e0ced",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ptp_clock_unregister",
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-5e7aafae",
"signature_type": "Function",
"digest": {
"function_hash": "259030023141840919967723861350534627518",
"length": 385.0
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2dea2a696d09163da4cd33cb598ce1f73e86597",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ptp_clock_unregister",
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-6740bcc2",
"signature_type": "Function",
"digest": {
"function_hash": "259030023141840919967723861350534627518",
"length": 385.0
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b2dea2a696d09163da4cd33cb598ce1f73e86597",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-6ae79e75",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"164084708168301479752907514237008366345",
"47268212966875325959201163756985769077",
"142751454002483810281057158963880527304",
"192335769708443185083616572430045817300",
"170233159827067646841670548507836305183",
"25387986173235581638078900653125359230",
"96348515980742032828783313235480349610",
"312219422415710947141140876092249662090"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c49eafe6249f844c26f9866886cc6719d81762df",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ptp_clock_unregister",
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-9db82bfd",
"signature_type": "Function",
"digest": {
"function_hash": "259030023141840919967723861350534627518",
"length": 385.0
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c49eafe6249f844c26f9866886cc6719d81762df",
"signature_version": "v1",
"deprecated": false,
"target": {
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-d7ccbce5",
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"164084708168301479752907514237008366345",
"47268212966875325959201163756985769077",
"142751454002483810281057158963880527304",
"192335769708443185083616572430045817300",
"170233159827067646841670548507836305183",
"25387986173235581638078900653125359230",
"96348515980742032828783313235480349610",
"312219422415710947141140876092249662090"
]
}
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bfcbb76b0f595ea9ede9f7a218086fef85242f10",
"signature_version": "v1",
"deprecated": false,
"target": {
"function": "ptp_clock_unregister",
"file": "drivers/ptp/ptp_clock.c"
},
"id": "CVE-2022-49229-e1b63068",
"signature_type": "Function",
"digest": {
"function_hash": "259030023141840919967723861350534627518",
"length": 385.0
}
}
]