)]}'
{
  "commit": "012cc567d00ab6e899cf3dc7c2845ec4cd68c1ff",
  "tree": "7005bd2d62f22a7c11678520480a8a3ef27ff4c4",
  "parents": [
    "1a1f5687989fbdea5be55132df09fab7145dd072"
  ],
  "author": {
    "name": "007bsd",
    "email": "22483432+007bsd@users.noreply.github.com",
    "time": "Mon May 04 20:07:29 2026 +0300"
  },
  "committer": {
    "name": "Norbert Pocs",
    "email": "norbertp@openssl.org",
    "time": "Thu May 14 11:31:27 2026 +0200"
  },
  "message": "Fix function pointer type mismatch when freeing ECX keys\n\nossl_ecx_key_free is declared as void(ECX_KEY *) but registered\ndirectly in the X25519/X448/Ed25519/Ed448 keymgmt OSSL_DISPATCH\ntables for OSSL_FUNC_KEYMGMT_FREE, which is invoked through a\nvoid(*)(void *) pointer in evp_keymgmt_freedata. Calling a function\nthrough a pointer to an incompatible function type is undefined\nbehavior and is reported by UndefinedBehaviorSanitizer on every\nECX key free:\n\n    crypto/evp/keymgmt_meth.c:392:5: runtime error: call to function\n      ossl_ecx_key_free through pointer to incorrect function type\n      \u0027void (*)(void *)\u0027\n    crypto/ec/ecx_key.c:65: note: ossl_ecx_key_free defined here\n\nAll four algorithms share the same MAKE_KEYMGMT_FUNCTIONS dispatch\nmacro, so they hit the same UB; UBSan just deduplicates the report\non the first call.\n\nMirror the wrapper pattern used by ml_kem_free_key, ml_dsa_free_key,\nslh_dsa_free_key, dsa_freedata, ec_freedata, and lms_free_key: add\na small static ecx_free_key with the correct OSSL_FUNC_keymgmt_free_fn\nsignature that forwards to ossl_ecx_key_free, and register the\nwrapper in the dispatch macro. The existing direct callers of\nossl_ecx_key_free in ecx_kmgmt.c are unchanged since they pass a\ntyped ECX_KEY *.\n\nCLA: trivial\n\nReviewed-by: Nikola Pajkovsky \u003cnikolap@openssl.org\u003e\nReviewed-by: Paul Yang \u003cpaulyang.inf@gmail.com\u003e\nReviewed-by: Tomas Mraz \u003ctomas@openssl.foundation\u003e\nMergeDate: Thu May 14 09:31:58 2026\n(Merged from https://github.com/openssl/openssl/pull/31078)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8489ce2248b55d5c1676d367c4b154cbefb2cd38",
      "old_mode": 33188,
      "old_path": "providers/implementations/keymgmt/ecx_kmgmt.c",
      "new_id": "d63fdd406ae60857be428bac3aa3e7df492ded2d",
      "new_mode": 33188,
      "new_path": "providers/implementations/keymgmt/ecx_kmgmt.c"
    }
  ]
}
