In the Linux kernel, the following vulnerability has been resolved:
blk-crypto: make blkcryptoevict_key() more robust
If blkcryptoevictkey() sees that the key is still in-use (due to a bug) or that ->keyslotevict failed, it currently just returns while leaving the key linked into the keyslot management structures.
However, blkcryptoevictkey() is only called in contexts such as inode eviction where failure is not an option. So actually the caller proceeds with freeing the blkcryptokey regardless of the return value of blkcryptoevictkey().
These two assumptions don't match, and the result is that there can be a use-after-free in blkcryptoreprogramallkeys() after one of these errors occurs. (Note, these errors shouldn't happen; we're just talking about what happens if they do anyway.)
Fix this by making blkcryptoevict_key() unlink the key from the keyslot management structures even on failure.
Also improve some comments.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53536.json"
}[
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"256728442921684661202936218592646212507",
"63493517373524762021423305343165798202",
"239202972851044992597937054505442579424",
"154379555189487615281669966615328515150",
"322816854319008337575194563201225185113",
"139416476275477756776801933027138024572",
"175668761061036443105025092870874810702",
"24458314370969366149397805998667838668",
"149506888980509292287831330931941920156",
"174174354282710759353433543884447129891",
"269759944633370978837710773089782763155",
"63014778952494747837860601888234169204",
"11703695103120766454859765738958361823",
"237893674747395372639455320637082719254",
"35688589923891801085423947310451891943",
"300572066619201559430554802685066832670",
"86249138167211020984511322281240465758",
"168039181185951224818374720358190589503",
"136004125037973858009881080723002870613",
"77134965002571770241822764680364297291",
"81530959042037373511282429016777137788",
"301707668426434306126134873920559783982",
"294513299792946458948513424117177698520",
"256668440286215236305284087824935346771"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@701a8220762ff90615dc91d3543f789391b63298",
"deprecated": false,
"id": "CVE-2023-53536-060e7c0e",
"signature_type": "Line",
"target": {
"file": "block/keyslot-manager.c"
},
"signature_version": "v1"
},
{
"digest": {
"length": 697.0,
"function_hash": "171686787087380215140808104830353505546"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5c62852942667c613de0458fc797c5b8c36112b5",
"deprecated": false,
"id": "CVE-2023-53536-12573c2e",
"signature_type": "Function",
"target": {
"function": "__blk_crypto_evict_key",
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"length": 697.0,
"function_hash": "171686787087380215140808104830353505546"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64ef787bb1588475163069c2e62fdd8f6c27b1f6",
"deprecated": false,
"id": "CVE-2023-53536-3151cdb5",
"signature_type": "Function",
"target": {
"function": "__blk_crypto_evict_key",
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"183959274913330872485755337164751055035",
"274411969350279899400011828080554147357",
"208344508992798606944863222747038155026",
"149310753214627131690236793454347707071",
"247729808690044244033780144393297164970",
"251179905474685329116745153227651918665",
"41814942102132550106002675901449616068",
"220850083350022247030770367845458169245",
"189264620961780764416196318170271232337",
"211812969945269599652263080817087401630",
"162539103802388676582988247140744901145",
"269759944633370978837710773089782763155",
"63014778952494747837860601888234169204",
"11703695103120766454859765738958361823",
"17297083101967065642394264260087287557",
"183429715329790720985779312030176060110",
"322190149774111037972400763629653582694",
"269324410383188941926211857396794391253",
"195209717630960336432309001368408094631",
"136004125037973858009881080723002870613",
"77134965002571770241822764680364297291",
"81530959042037373511282429016777137788",
"305385070603030131585952177428928609142",
"298131256301351992271228911409097977214",
"183193684187368596534386681078950345923"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@64ef787bb1588475163069c2e62fdd8f6c27b1f6",
"deprecated": false,
"id": "CVE-2023-53536-3e11cfc2",
"signature_type": "Line",
"target": {
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"256728442921684661202936218592646212507",
"63493517373524762021423305343165798202",
"239202972851044992597937054505442579424",
"154379555189487615281669966615328515150",
"322816854319008337575194563201225185113",
"227889870003321662781221681156162258594",
"132787033773226867359849918147947802554",
"13808617623586111717141264112721019867",
"307544905973993170381365574330880506045",
"149506888980509292287831330931941920156",
"174174354282710759353433543884447129891",
"269759944633370978837710773089782763155",
"63014778952494747837860601888234169204",
"11703695103120766454859765738958361823",
"237893674747395372639455320637082719254",
"35688589923891801085423947310451891943",
"300572066619201559430554802685066832670",
"86249138167211020984511322281240465758",
"168039181185951224818374720358190589503",
"136004125037973858009881080723002870613",
"77134965002571770241822764680364297291",
"81530959042037373511282429016777137788",
"301707668426434306126134873920559783982",
"294513299792946458948513424117177698520",
"256668440286215236305284087824935346771"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bb4005fb667c6e2188fa87950f8d5faf2994410",
"deprecated": false,
"id": "CVE-2023-53536-49314ac1",
"signature_type": "Line",
"target": {
"file": "block/keyslot-manager.c"
},
"signature_version": "v1"
},
{
"digest": {
"length": 493.0,
"function_hash": "184791628891833111874625881186672595666"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@701a8220762ff90615dc91d3543f789391b63298",
"deprecated": false,
"id": "CVE-2023-53536-4f3f2a23",
"signature_type": "Function",
"target": {
"function": "blk_ksm_evict_key",
"file": "block/keyslot-manager.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"183959274913330872485755337164751055035",
"274411969350279899400011828080554147357",
"208344508992798606944863222747038155026",
"149310753214627131690236793454347707071",
"247729808690044244033780144393297164970",
"251179905474685329116745153227651918665",
"41814942102132550106002675901449616068",
"220850083350022247030770367845458169245",
"189264620961780764416196318170271232337",
"211812969945269599652263080817087401630",
"162539103802388676582988247140744901145",
"269759944633370978837710773089782763155",
"63014778952494747837860601888234169204",
"11703695103120766454859765738958361823",
"17297083101967065642394264260087287557",
"183429715329790720985779312030176060110",
"322190149774111037972400763629653582694",
"269324410383188941926211857396794391253",
"195209717630960336432309001368408094631",
"136004125037973858009881080723002870613",
"77134965002571770241822764680364297291",
"81530959042037373511282429016777137788",
"305385070603030131585952177428928609142",
"298131256301351992271228911409097977214",
"183193684187368596534386681078950345923"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5c62852942667c613de0458fc797c5b8c36112b5",
"deprecated": false,
"id": "CVE-2023-53536-615f5c2b",
"signature_type": "Line",
"target": {
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"183959274913330872485755337164751055035",
"274411969350279899400011828080554147357",
"208344508992798606944863222747038155026",
"149310753214627131690236793454347707071",
"247729808690044244033780144393297164970",
"251179905474685329116745153227651918665",
"41814942102132550106002675901449616068",
"220850083350022247030770367845458169245",
"189264620961780764416196318170271232337",
"211812969945269599652263080817087401630",
"162539103802388676582988247140744901145",
"269759944633370978837710773089782763155",
"63014778952494747837860601888234169204",
"11703695103120766454859765738958361823",
"17297083101967065642394264260087287557",
"183429715329790720985779312030176060110",
"322190149774111037972400763629653582694",
"269324410383188941926211857396794391253",
"195209717630960336432309001368408094631",
"136004125037973858009881080723002870613",
"77134965002571770241822764680364297291",
"81530959042037373511282429016777137788",
"305385070603030131585952177428928609142",
"298131256301351992271228911409097977214",
"183193684187368596534386681078950345923"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5c7cb94452901a93e90c2230632e2c12a681bc92",
"deprecated": false,
"id": "CVE-2023-53536-7d1475cf",
"signature_type": "Line",
"target": {
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"length": 704.0,
"function_hash": "40350122262028520058226124433743787992"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bb4005fb667c6e2188fa87950f8d5faf2994410",
"deprecated": false,
"id": "CVE-2023-53536-82c51d0f",
"signature_type": "Function",
"target": {
"function": "blk_ksm_evict_key",
"file": "block/keyslot-manager.c"
},
"signature_version": "v1"
},
{
"digest": {
"length": 697.0,
"function_hash": "171686787087380215140808104830353505546"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5c7cb94452901a93e90c2230632e2c12a681bc92",
"deprecated": false,
"id": "CVE-2023-53536-979355ae",
"signature_type": "Function",
"target": {
"function": "__blk_crypto_evict_key",
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"length": 697.0,
"function_hash": "171686787087380215140808104830353505546"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@809a5be62e92a444a3c3d7b9f438019d0b322f55",
"deprecated": false,
"id": "CVE-2023-53536-9fc0279e",
"signature_type": "Function",
"target": {
"function": "__blk_crypto_evict_key",
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"183959274913330872485755337164751055035",
"274411969350279899400011828080554147357",
"208344508992798606944863222747038155026",
"149310753214627131690236793454347707071",
"247729808690044244033780144393297164970",
"251179905474685329116745153227651918665",
"41814942102132550106002675901449616068",
"220850083350022247030770367845458169245",
"189264620961780764416196318170271232337",
"211812969945269599652263080817087401630",
"162539103802388676582988247140744901145",
"269759944633370978837710773089782763155",
"63014778952494747837860601888234169204",
"11703695103120766454859765738958361823",
"17297083101967065642394264260087287557",
"183429715329790720985779312030176060110",
"322190149774111037972400763629653582694",
"269324410383188941926211857396794391253",
"195209717630960336432309001368408094631",
"136004125037973858009881080723002870613",
"77134965002571770241822764680364297291",
"81530959042037373511282429016777137788",
"305385070603030131585952177428928609142",
"298131256301351992271228911409097977214",
"183193684187368596534386681078950345923"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@809a5be62e92a444a3c3d7b9f438019d0b322f55",
"deprecated": false,
"id": "CVE-2023-53536-a6609dfc",
"signature_type": "Line",
"target": {
"file": "block/blk-crypto-profile.c"
},
"signature_version": "v1"
}
]
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53536.json"