CVE-2022-49749

i2c: designware: use casting of u64 in clock multiplication to avoid overflow

State
Published
Severity
5.5 Medium
Published
Mar 27, 2025
Updated
May 11, 2026
Reserved
Mar 27, 2025

Read the record on cve.org

Description

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

i2c: designware: use casting of u64 in clock multiplication to avoid overflow

In functions i2c_dw_scl_lcnt() and i2c_dw_scl_hcnt() may have overflow by depending on the values of the given parameters including the ic_clk. For example in our use case where ic_clk is larger than one million, multiplication of ic_clk * 4700 will result in 32 bit overflow.

Add cast of u64 to the calculation to avoid multiplication overflow, and use the corresponding define for divide.

Scores

CVSSScoreVectorSource
3.15.5 MediumCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HCISA-ADP

Weaknesses

  • CWE-190 Integer Overflow or Wraparound

Affected Products

ProductVersions
LinuxLinux
  • 2373f6b9744d5373b886f3ce1a985193cca0a356 to before ed173f77fd28a3e4fffc13b3f28687b9eba61157Affected
  • 2373f6b9744d5373b886f3ce1a985193cca0a356 to before 2f29d780bd691d20e89e5b35d5e6568607115e94Affected
  • 2373f6b9744d5373b886f3ce1a985193cca0a356 to before 9f36aae9e80e79b7a6d62227eaa96935166be9feAffected
  • 2373f6b9744d5373b886f3ce1a985193cca0a356 to before c8c37bc514514999e62a17e95160ed9ebf75ca8dAffected
LinuxLinux
  • 3.2Affected
  • before 3.2Not affected
  • 5.10.166 through 5.10.*Not affected
  • 5.15.91 through 5.15.*Not affected
  • 6.1.9 through 6.1.*Not affected
  • 6.2 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.