Issue summary: Clients using RFC7250 Raw Public Keys (RPKs) to authenticate a server may fail to notice that the server was not authenticated, because handshakes don't abort as expected when the SSLVERIFYPEER verification mode is set.
Impact summary: TLS and DTLS connections using raw public keys may be vulnerable to man-in-middle attacks when server authentication failure is not detected by clients.
RPKs are disabled by default in both TLS clients and TLS servers. The issue only arises when TLS clients explicitly enable RPK use by the server, and the server, likewise, enables sending of an RPK instead of an X.509 certificate chain. The affected clients are those that then rely on the handshake to fail when the server's RPK fails to match one of the expected public keys, by setting the verification mode to SSLVERIFYPEER.
Clients that enable server-side raw public keys can still find out that raw public key verification failed by calling SSLgetverify_result(), and those that do, and take appropriate action, are not affected. This issue was introduced in the initial implementation of RPK support in OpenSSL 3.2.
The FIPS modules in 3.4, 3.3, 3.2, 3.1 and 3.0 are not affected by this issue.
[
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/738d4f9fdeaad57660dcba50a619fafced3fd5e9",
"target": {
"function": "tls_post_process_server_rpk",
"file": "ssl/statem/statem_clnt.c"
},
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 1282.0,
"function_hash": "1956042097252918535424513507721537074"
},
"id": "CVE-2024-12797-075983d2"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/87ebd203feffcf92ad5889df92f90bb0ee10a699",
"target": {
"function": "tls_post_process_server_rpk",
"file": "ssl/statem/statem_clnt.c"
},
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 1282.0,
"function_hash": "1956042097252918535424513507721537074"
},
"id": "CVE-2024-12797-21b472ef"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/87ebd203feffcf92ad5889df92f90bb0ee10a699",
"target": {
"function": "test_rpk",
"file": "test/rpktest.c"
},
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 12532.0,
"function_hash": "99201829665977675752850617662169141139"
},
"id": "CVE-2024-12797-2d1e0f85"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/798779d43494549b611233f92652f0da5328fbe7",
"target": {
"function": "test_rpk",
"file": "test/rpktest.c"
},
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 12532.0,
"function_hash": "99201829665977675752850617662169141139"
},
"id": "CVE-2024-12797-3c50970c"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/798779d43494549b611233f92652f0da5328fbe7",
"target": {
"function": "tls_post_process_server_rpk",
"file": "ssl/statem/statem_clnt.c"
},
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 1282.0,
"function_hash": "1956042097252918535424513507721537074"
},
"id": "CVE-2024-12797-3d63629a"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/798779d43494549b611233f92652f0da5328fbe7",
"target": {
"file": "test/rpktest.c"
},
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"194895840053125800411198705749778652772",
"244123533769597480912778702112131150276",
"56890279128527066791863257211573305452",
"64592593643054646872423648187950072531",
"253096137946299194702585990651476174811",
"336952088873448572681477654246988342849",
"207304481912974536185880903003645252158",
"329503287506843147960647987289790425909",
"72093447884906931550134207116954003218",
"53880554323656833826177911612982326888",
"302903320373408414422312084390951887359",
"54284842055507903823259025280599468395",
"305408705853469841011806500753544124055",
"154837961742484823614963884172654512139",
"310602236645320588146023785225072354498",
"294383287405727280509409670302742617827",
"176174255703733472635278490665741270092",
"160324218967815168496517909911684309402",
"318100534476875619475858398496500843361",
"204690598214224180932900627798289550568",
"12429303563724030504327404011985257645",
"136864886263131352794001348425727145014",
"115731504740208052277968552826031858920",
"188744313058683617409318189316853196587",
"130688613320683242973055599822126281770",
"98794971652304433928582512453478544145",
"69814264132754189763603860914449052074",
"140617443958657607393205050081793692856",
"221756215705910222704514197733768414657",
"258897346236442774344848316839001249776",
"249038638794700682249941503034864395970",
"177578284300772796468738048967563881213",
"128036384743267361859089750418003104218",
"211856099620522457597545598478235132900",
"257882452027245632463953502335060715632",
"184835865256216361891623530403973543048",
"259775556156763591790549975040825308145",
"176050665414952300618216462802395270530",
"34781342114220878773226429961409053713",
"152438846045329957067450268979516311912",
"176002869381885527026341584311154238367",
"291415429745447743672068570338936955350"
]
},
"id": "CVE-2024-12797-55e6101e"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/738d4f9fdeaad57660dcba50a619fafced3fd5e9",
"target": {
"function": "test_rpk",
"file": "test/rpktest.c"
},
"signature_type": "Function",
"deprecated": false,
"digest": {
"length": 12532.0,
"function_hash": "99201829665977675752850617662169141139"
},
"id": "CVE-2024-12797-9d736dcd"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/87ebd203feffcf92ad5889df92f90bb0ee10a699",
"target": {
"file": "ssl/statem/statem_clnt.c"
},
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"286986336932970536479090767212940140018",
"22578473730394408914053477402192760402",
"79418574720691607033433482075140060154",
"202765182941696435130541605397700629150",
"74453222846082221573266937162884068974",
"289946317748600655830603953910709050665",
"290204558549354221763144937405425137164",
"69369722430295584682263066104119095332",
"157583788306118977836222034997318547455",
"83210052581632726721186477811029700554"
]
},
"id": "CVE-2024-12797-aa791388"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/738d4f9fdeaad57660dcba50a619fafced3fd5e9",
"target": {
"file": "test/rpktest.c"
},
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"194895840053125800411198705749778652772",
"244123533769597480912778702112131150276",
"56890279128527066791863257211573305452",
"64592593643054646872423648187950072531",
"253096137946299194702585990651476174811",
"336952088873448572681477654246988342849",
"207304481912974536185880903003645252158",
"329503287506843147960647987289790425909",
"72093447884906931550134207116954003218",
"53880554323656833826177911612982326888",
"302903320373408414422312084390951887359",
"54284842055507903823259025280599468395",
"305408705853469841011806500753544124055",
"154837961742484823614963884172654512139",
"310602236645320588146023785225072354498",
"294383287405727280509409670302742617827",
"176174255703733472635278490665741270092",
"160324218967815168496517909911684309402",
"318100534476875619475858398496500843361",
"204690598214224180932900627798289550568",
"12429303563724030504327404011985257645",
"136864886263131352794001348425727145014",
"115731504740208052277968552826031858920",
"188744313058683617409318189316853196587",
"130688613320683242973055599822126281770",
"98794971652304433928582512453478544145",
"69814264132754189763603860914449052074",
"140617443958657607393205050081793692856",
"221756215705910222704514197733768414657",
"258897346236442774344848316839001249776",
"249038638794700682249941503034864395970",
"177578284300772796468738048967563881213",
"128036384743267361859089750418003104218",
"211856099620522457597545598478235132900",
"257882452027245632463953502335060715632",
"184835865256216361891623530403973543048",
"259775556156763591790549975040825308145",
"176050665414952300618216462802395270530",
"34781342114220878773226429961409053713",
"152438846045329957067450268979516311912",
"176002869381885527026341584311154238367",
"291415429745447743672068570338936955350"
]
},
"id": "CVE-2024-12797-b5b50605"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/798779d43494549b611233f92652f0da5328fbe7",
"target": {
"file": "ssl/statem/statem_clnt.c"
},
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"286986336932970536479090767212940140018",
"22578473730394408914053477402192760402",
"79418574720691607033433482075140060154",
"202765182941696435130541605397700629150",
"74453222846082221573266937162884068974",
"289946317748600655830603953910709050665",
"290204558549354221763144937405425137164",
"69369722430295584682263066104119095332",
"157583788306118977836222034997318547455",
"83210052581632726721186477811029700554"
]
},
"id": "CVE-2024-12797-dd443cb3"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/738d4f9fdeaad57660dcba50a619fafced3fd5e9",
"target": {
"file": "ssl/statem/statem_clnt.c"
},
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"286986336932970536479090767212940140018",
"22578473730394408914053477402192760402",
"79418574720691607033433482075140060154",
"202765182941696435130541605397700629150",
"74453222846082221573266937162884068974",
"289946317748600655830603953910709050665",
"290204558549354221763144937405425137164",
"69369722430295584682263066104119095332",
"157583788306118977836222034997318547455",
"83210052581632726721186477811029700554"
]
},
"id": "CVE-2024-12797-f8e7f921"
},
{
"signature_version": "v1",
"source": "https://github.com/openssl/openssl/commit/87ebd203feffcf92ad5889df92f90bb0ee10a699",
"target": {
"file": "test/rpktest.c"
},
"signature_type": "Line",
"deprecated": false,
"digest": {
"threshold": 0.9,
"line_hashes": [
"194895840053125800411198705749778652772",
"244123533769597480912778702112131150276",
"56890279128527066791863257211573305452",
"64592593643054646872423648187950072531",
"253096137946299194702585990651476174811",
"336952088873448572681477654246988342849",
"207304481912974536185880903003645252158",
"329503287506843147960647987289790425909",
"72093447884906931550134207116954003218",
"53880554323656833826177911612982326888",
"302903320373408414422312084390951887359",
"54284842055507903823259025280599468395",
"305408705853469841011806500753544124055",
"154837961742484823614963884172654512139",
"310602236645320588146023785225072354498",
"294383287405727280509409670302742617827",
"176174255703733472635278490665741270092",
"160324218967815168496517909911684309402",
"318100534476875619475858398496500843361",
"204690598214224180932900627798289550568",
"12429303563724030504327404011985257645",
"136864886263131352794001348425727145014",
"115731504740208052277968552826031858920",
"188744313058683617409318189316853196587",
"130688613320683242973055599822126281770",
"98794971652304433928582512453478544145",
"69814264132754189763603860914449052074",
"140617443958657607393205050081793692856",
"221756215705910222704514197733768414657",
"258897346236442774344848316839001249776",
"249038638794700682249941503034864395970",
"177578284300772796468738048967563881213",
"128036384743267361859089750418003104218",
"211856099620522457597545598478235132900",
"257882452027245632463953502335060715632",
"184835865256216361891623530403973543048",
"259775556156763591790549975040825308145",
"176050665414952300618216462802395270530",
"34781342114220878773226429961409053713",
"152438846045329957067450268979516311912",
"176002869381885527026341584311154238367",
"291415429745447743672068570338936955350"
]
},
"id": "CVE-2024-12797-fb50e3cc"
}
]