In the Linux kernel, the following vulnerability has been resolved:
tpm: use trygetops() in tpm-space.c
As part of the series conversion to remove nested TPM operations:
https://lore.kernel.org/all/20190205224723.19671-1-jarkko.sakkinen@linux.intel.com/
exposure of the chip->tpmmutex was removed from much of the upper level code. In this conversion, tpm2delspace() was missed. This didn't matter much because it's usually called closely after a converted operation, so there's only a very tiny race window where the chip can be removed before the space flushing is done which causes a NULL deref on the mutex. However, there are reports of this window being hit in practice, so fix this by converting tpm2delspace() to use tpmtrygetops(), which performs all the teardown checks before acquring the mutex.
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331272154412504664695332133570294079521",
"33398721515947779770433129510478811397",
"272063751029405587726141966747654039172",
"68804147023680900234517184466546654006",
"101631457828983840532973443692821979089",
"92756718608712065132904841057497743735",
"113175582695905671309090153202490518795",
"245756668234619594842518263443908414553",
"70721020253823384501534743022892175266"
]
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5b1d2561a03e534064b51c50c774657833d3d2cf",
"id": "CVE-2022-49286-055b4a10",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331272154412504664695332133570294079521",
"33398721515947779770433129510478811397",
"272063751029405587726141966747654039172",
"68804147023680900234517184466546654006",
"101631457828983840532973443692821979089",
"92756718608712065132904841057497743735",
"113175582695905671309090153202490518795",
"245756668234619594842518263443908414553",
"70721020253823384501534743022892175266"
]
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb5abce6b2bb5cb3d628aaa63fa821da8c4600f9",
"id": "CVE-2022-49286-085f8b75",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "177119097677895013539165768360431707872",
"length": 278.0
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c",
"function": "tpm2_del_space"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5b1d2561a03e534064b51c50c774657833d3d2cf",
"id": "CVE-2022-49286-0d097cab",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331272154412504664695332133570294079521",
"33398721515947779770433129510478811397",
"272063751029405587726141966747654039172",
"68804147023680900234517184466546654006",
"101631457828983840532973443692821979089",
"92756718608712065132904841057497743735",
"113175582695905671309090153202490518795",
"245756668234619594842518263443908414553",
"70721020253823384501534743022892175266"
]
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba84f9a48366dcc3cdef978599433efe101dd5bd",
"id": "CVE-2022-49286-29265e29",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "177119097677895013539165768360431707872",
"length": 278.0
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c",
"function": "tpm2_del_space"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eda1662cce964c8a65bb86321f8d9cfa6e9ceaab",
"id": "CVE-2022-49286-40ebaee0",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "177119097677895013539165768360431707872",
"length": 278.0
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c",
"function": "tpm2_del_space"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95193d12f10a8a088843b25e0f5fe1d83ec6b079",
"id": "CVE-2022-49286-4761c84e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "177119097677895013539165768360431707872",
"length": 278.0
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c",
"function": "tpm2_del_space"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fb5abce6b2bb5cb3d628aaa63fa821da8c4600f9",
"id": "CVE-2022-49286-61d66e5d",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331272154412504664695332133570294079521",
"33398721515947779770433129510478811397",
"272063751029405587726141966747654039172",
"68804147023680900234517184466546654006",
"101631457828983840532973443692821979089",
"92756718608712065132904841057497743735",
"113175582695905671309090153202490518795",
"245756668234619594842518263443908414553",
"70721020253823384501534743022892175266"
]
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@476ddd23f818fb94cf86fb5617f3bb9a7c92113d",
"id": "CVE-2022-49286-bb0743ce",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "177119097677895013539165768360431707872",
"length": 278.0
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c",
"function": "tpm2_del_space"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ba84f9a48366dcc3cdef978599433efe101dd5bd",
"id": "CVE-2022-49286-c9f66830",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331272154412504664695332133570294079521",
"33398721515947779770433129510478811397",
"272063751029405587726141966747654039172",
"68804147023680900234517184466546654006",
"101631457828983840532973443692821979089",
"92756718608712065132904841057497743735",
"113175582695905671309090153202490518795",
"245756668234619594842518263443908414553",
"70721020253823384501534743022892175266"
]
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95193d12f10a8a088843b25e0f5fe1d83ec6b079",
"id": "CVE-2022-49286-d3f7ff93",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Function",
"digest": {
"function_hash": "177119097677895013539165768360431707872",
"length": 278.0
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c",
"function": "tpm2_del_space"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@476ddd23f818fb94cf86fb5617f3bb9a7c92113d",
"id": "CVE-2022-49286-e0c3b61e",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"331272154412504664695332133570294079521",
"33398721515947779770433129510478811397",
"272063751029405587726141966747654039172",
"68804147023680900234517184466546654006",
"101631457828983840532973443692821979089",
"92756718608712065132904841057497743735",
"113175582695905671309090153202490518795",
"245756668234619594842518263443908414553",
"70721020253823384501534743022892175266"
]
},
"target": {
"file": "drivers/char/tpm/tpm2-space.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@eda1662cce964c8a65bb86321f8d9cfa6e9ceaab",
"id": "CVE-2022-49286-f554559a",
"deprecated": false,
"signature_version": "v1"
}
]