VYPR
Unrated severityNVD Advisory· Published Jun 8, 2026

CVE-2026-46291

CVE-2026-46291

Description

In the Linux kernel, the following vulnerability has been resolved:

crypto: caam - guard HMAC key hex dumps in hash_digest_key

Use print_hex_dump_devel() for dumping sensitive HMAC key bytes in hash_digest_key() to avoid leaking secrets at runtime when CONFIG_DYNAMIC_DEBUG is enabled.

Affected products

1

Patches

10
2adbfca7452e

crypto: caam - guard HMAC key hex dumps in hash_digest_key

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.gitThorsten BlumMay 10, 2026Fixed in 6.6.140via kernel-cna
2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 06e0681fdbe15..ac97a15ac78b6 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3268,7 +3268,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3288,7 +3288,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 30cc46c4c33af..c1a06f033b118 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
177730a273b1

crypto: caam - guard HMAC key hex dumps in hash_digest_key

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.gitThorsten BlumMar 19, 2026Fixed in 7.1-rc1via kernel-cna
2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 553994228a17b..854200850830b 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3270,7 +3270,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3290,7 +3290,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index e0a23c55c10e0..72cfe00df3f43 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
5cffe3c13689

crypto: caam - guard HMAC key hex dumps in hash_digest_key

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.gitThorsten BlumFixed in 6.18.30via kernel-cna
2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 07665494c8758..c97c10cdf207a 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3269,7 +3269,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3289,7 +3289,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 053af748be86d..cc942e5ab2799 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
c7e52fe3f790

crypto: caam - guard HMAC key hex dumps in hash_digest_key

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.gitThorsten BlumFixed in 6.12.88via kernel-cna
2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 9ef8ee77c52aa..31bc3d747ec0c 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3268,7 +3268,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3288,7 +3288,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 053af748be86d..cc942e5ab2799 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
b8f12d9b00c1

crypto: caam - guard HMAC key hex dumps in hash_digest_key

2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 78964e1712e58..3343ddc30076f 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3269,7 +3269,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3289,7 +3289,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 44122208f70cb..a0c417b7b8059 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
2adbfca7452e

crypto: caam - guard HMAC key hex dumps in hash_digest_key

2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 06e0681fdbe15..ac97a15ac78b6 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3268,7 +3268,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3288,7 +3288,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 30cc46c4c33af..c1a06f033b118 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
177730a273b1

crypto: caam - guard HMAC key hex dumps in hash_digest_key

2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 553994228a17b..854200850830b 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3270,7 +3270,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3290,7 +3290,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index e0a23c55c10e0..72cfe00df3f43 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
c7e52fe3f790

crypto: caam - guard HMAC key hex dumps in hash_digest_key

2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 9ef8ee77c52aa..31bc3d747ec0c 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3268,7 +3268,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3288,7 +3288,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 053af748be86d..cc942e5ab2799 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
b8f12d9b00c1

crypto: caam - guard HMAC key hex dumps in hash_digest_key

2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 78964e1712e58..3343ddc30076f 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3269,7 +3269,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3289,7 +3289,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 44122208f70cb..a0c417b7b8059 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    
5cffe3c13689

crypto: caam - guard HMAC key hex dumps in hash_digest_key

2 files changed · +4 5
  • drivers/crypto/caam/caamalg_qi2.c+2 2 modified
    diff --git a/drivers/crypto/caam/caamalg_qi2.c b/drivers/crypto/caam/caamalg_qi2.c
    index 07665494c8758..c97c10cdf207a 100644
    --- a/drivers/crypto/caam/caamalg_qi2.c
    +++ b/drivers/crypto/caam/caamalg_qi2.c
    @@ -3269,7 +3269,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	dpaa2_fl_set_addr(out_fle, key_dma);
     	dpaa2_fl_set_len(out_fle, digestsize);
     
    -	print_hex_dump_debug("key_in@" __stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("shdesc@" __stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -3289,7 +3289,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		/* in progress */
     		wait_for_completion(&result.completion);
     		ret = result.err;
    -		print_hex_dump_debug("digested key@" __stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@" __stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    
  • drivers/crypto/caam/caamhash.c+2 3 modified
    diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
    index 053af748be86d..cc942e5ab2799 100644
    --- a/drivers/crypto/caam/caamhash.c
    +++ b/drivers/crypto/caam/caamhash.c
    @@ -393,7 +393,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     	append_seq_store(desc, digestsize, LDST_CLASS_2_CCB |
     			 LDST_SRCDST_BYTE_CONTEXT);
     
    -	print_hex_dump_debug("key_in@"__stringify(__LINE__)": ",
    +	print_hex_dump_devel("key_in@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, key, *keylen, 1);
     	print_hex_dump_debug("jobdesc@"__stringify(__LINE__)": ",
     			     DUMP_PREFIX_ADDRESS, 16, 4, desc, desc_bytes(desc),
    @@ -408,7 +408,7 @@ static int hash_digest_key(struct caam_hash_ctx *ctx, u32 *keylen, u8 *key,
     		wait_for_completion(&result.completion);
     		ret = result.err;
     
    -		print_hex_dump_debug("digested key@"__stringify(__LINE__)": ",
    +		print_hex_dump_devel("digested key@"__stringify(__LINE__)": ",
     				     DUMP_PREFIX_ADDRESS, 16, 4, key,
     				     digestsize, 1);
     	}
    -- 
    cgit 1.3-korg
    
    
    

Vulnerability mechanics

Root cause

"The `hash_digest_key` function used `print_hex_dump_debug` to log sensitive HMAC key data, which could be exposed when `CONFIG_DYNAMIC_DEBUG` is enabled."

Attack vector

An attacker could trigger the `hash_digest_key` function within the Linux kernel's crypto subsystem. If `CONFIG_DYNAMIC_DEBUG` is enabled, the function's debug output, which includes sensitive HMAC key bytes, could be exposed at runtime. This exposure could lead to the leakage of cryptographic secrets.

Affected code

The vulnerability exists in the `hash_digest_key` function located in `drivers/crypto/caam/caamhash.c` and `drivers/crypto/caam/caamalg_qi2.c`. Specifically, the use of `print_hex_dump_debug` for logging HMAC key data is the root cause.

What the fix does

The patch replaces calls to `print_hex_dump_debug` with `print_hex_dump_devel` within the `hash_digest_key` function in `drivers/crypto/caam/caamhash.c` and `drivers/crypto/caam/caamalg_qi2.c`. This change ensures that sensitive HMAC key data is only dumped when `CONFIG_DYNAMIC_DEBUG` is explicitly enabled and the debug level is appropriate, thereby preventing accidental leakage of secrets at runtime.

Preconditions

  • configThe `CONFIG_DYNAMIC_DEBUG` kernel configuration option must be enabled.

Generated on Jun 8, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

1