Skip to content

crypto.h: info leak / reproducibility issue via public header in 4.1.0 #1154

@vszakats

Description

@vszakats

openssl/crypto.h in 4.1.0 has this:

#define OPENSSL_malloc(num)>CRYPTO_malloc((num),OPENSSL_FILE,OPENSSL_LINE)
#define OPENSSL_strdup(str)>CRYPTO_strdup((str),OPENSSL_FILE,OPENSSL_LINE)
#define OPENSSL_free(addr)<>CRYPTO_free((addr),OPENSSL_FILE,OPENSSL_LINE)

whereas in 4.0.0 these lines were:

#define OPENSSL_malloc(num)>CRYPTO_malloc((num),NULL,0)
#define OPENSSL_strdup(str)>CRYPTO_strdup((str),NULL,0)
#define OPENSSL_free(addr)<>CRYPTO_free((addr),NULL,0)

It means that LibreSSL dependencies using these APIs are now affected by
__FILE__ and __LINE__ containing private/local paths and also broken
reproducibility unless built with OPENSSL_NO_FILENAMES, like LibreSSL itself.

I expected OPENSSL_NO_FILENAMES to be a private macro, and LibreSSL
public headers not use to __FILE__ (and __LINE__).

Ref: #761

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions