VYPR
Unrated severityNVD Advisory· Published Sep 18, 2023· Updated Sep 25, 2024

CVE-2020-36766

CVE-2020-36766

Description

An issue was discovered in the Linux kernel before 5.8.6. drivers/media/cec/core/cec-api.c leaks one byte of kernel memory on specific hardware to unprivileged users, because of directly assigning log_addrs with a hole in the struct.

Affected products

130

Patches

1
6c42227c3467

cec-api: prevent leaking memory through hole in structure

https://github.com/torvalds/linuxHans VerkuilJun 26, 2020via osv
1 file changed · +7 1
  • drivers/media/cec/core/cec-api.c+7 1 modified
    @@ -147,7 +147,13 @@ static long cec_adap_g_log_addrs(struct cec_adapter *adap,
     	struct cec_log_addrs log_addrs;
     
     	mutex_lock(&adap->lock);
    -	log_addrs = adap->log_addrs;
    +	/*
    +	 * We use memcpy here instead of assignment since there is a
    +	 * hole at the end of struct cec_log_addrs that an assignment
    +	 * might ignore. So when we do copy_to_user() we could leak
    +	 * one byte of memory.
    +	 */
    +	memcpy(&log_addrs, &adap->log_addrs, sizeof(log_addrs));
     	if (!adap->is_configured)
     		memset(log_addrs.log_addr, CEC_LOG_ADDR_INVALID,
     		       sizeof(log_addrs.log_addr));
    

Vulnerability mechanics

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

References

2

News mentions

0

No linked articles in our index yet.