{"id":"CVE-2019-25162","state":"PUBLISHED","title":"i2c: Fix a potential use after free","description":"In the Linux kernel, the following vulnerability has been resolved:\n\ni2c: Fix a potential use after free\n\nFree the adap structure only after we are done using it.\nThis patch just moves the put_device() down a bit to avoid the\nuse after free.\n\n[wsa: added comment to the code, added Fixes tag]","publishedAt":"2024-02-26T17:20:20.846Z","updatedAt":"2026-08-05T08:43:46.382Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"e6412ba3b6508bdf9c074d310bf4144afa6aec1a","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"23a191b132cd87f746c62f3dc27da33683d85829","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"871a1e94929a27bf6e2cd99523865c840bbc2d87","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"81cb31756888bb062e92d2dca21cd629d77a46a9","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"35927d7509ab9bf41896b7e44f639504eae08af7","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"e8e1a046cf87c8b1363e5de835114f2779e2aaf4","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"12b0606000d0828630c033bf0c74c748464fe87d","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"e4c72c06c367758a14f227c847f9d623f1994ecf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/i2c/i2c-core-base.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.3","versionType":"semver"},{"version":"4.14.291","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.256","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.211","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.137","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.61","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.18.18","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/i2c/i2c-core-base.c"]}],"references":["https://git.kernel.org/stable/c/e6412ba3b6508bdf9c074d310bf4144afa6aec1a","https://git.kernel.org/stable/c/23a191b132cd87f746c62f3dc27da33683d85829","https://git.kernel.org/stable/c/871a1e94929a27bf6e2cd99523865c840bbc2d87","https://git.kernel.org/stable/c/81cb31756888bb062e92d2dca21cd629d77a46a9","https://git.kernel.org/stable/c/35927d7509ab9bf41896b7e44f639504eae08af7","https://git.kernel.org/stable/c/e8e1a046cf87c8b1363e5de835114f2779e2aaf4","https://git.kernel.org/stable/c/12b0606000d0828630c033bf0c74c748464fe87d","https://git.kernel.org/stable/c/e4c72c06c367758a14f227c847f9d623f1994ecf"],"weaknesses":[],"ingestedAt":"2026-10-29T19:45:53.332Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2019/25xxx/CVE-2019-25162.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2019-25162","state":"PUBLISHED","datePublished":"2024-02-26T17:20:20.846Z","dateUpdated":"2026-08-05T08:43:46.382Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-02-26T17:07:20.465Z"},"containers":{"cna":{"title":"i2c: Fix a potential use after free","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\ni2c: Fix a potential use after free\n\nFree the adap structure only after we are done using it.\nThis patch just moves the put_device() down a bit to avoid the\nuse after free.\n\n[wsa: added comment to the code, added Fixes tag]"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"e6412ba3b6508bdf9c074d310bf4144afa6aec1a","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"23a191b132cd87f746c62f3dc27da33683d85829","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"871a1e94929a27bf6e2cd99523865c840bbc2d87","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"81cb31756888bb062e92d2dca21cd629d77a46a9","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"35927d7509ab9bf41896b7e44f639504eae08af7","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"e8e1a046cf87c8b1363e5de835114f2779e2aaf4","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"12b0606000d0828630c033bf0c74c748464fe87d","versionType":"git"},{"version":"611e12ea0f121a31d9e9c4ce2a18a77abc2f28d6","status":"affected","lessThan":"e4c72c06c367758a14f227c847f9d623f1994ecf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/i2c/i2c-core-base.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.3","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.3","versionType":"semver"},{"version":"4.14.291","status":"unaffected","lessThanOrEqual":"4.14.*","versionType":"semver"},{"version":"4.19.256","status":"unaffected","lessThanOrEqual":"4.19.*","versionType":"semver"},{"version":"5.4.211","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.137","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.61","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"5.18.18","status":"unaffected","lessThanOrEqual":"5.18.*","versionType":"semver"},{"version":"5.19.2","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/i2c/i2c-core-base.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e6412ba3b6508bdf9c074d310bf4144afa6aec1a"},{"url":"https://git.kernel.org/stable/c/23a191b132cd87f746c62f3dc27da33683d85829"},{"url":"https://git.kernel.org/stable/c/871a1e94929a27bf6e2cd99523865c840bbc2d87"},{"url":"https://git.kernel.org/stable/c/81cb31756888bb062e92d2dca21cd629d77a46a9"},{"url":"https://git.kernel.org/stable/c/35927d7509ab9bf41896b7e44f639504eae08af7"},{"url":"https://git.kernel.org/stable/c/e8e1a046cf87c8b1363e5de835114f2779e2aaf4"},{"url":"https://git.kernel.org/stable/c/12b0606000d0828630c033bf0c74c748464fe87d"},{"url":"https://git.kernel.org/stable/c/e4c72c06c367758a14f227c847f9d623f1994ecf"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable i2c_put_adapter path is reached locally via i2c-dev (/dev/i2c-* open/release) or other in-kernel get/put holders; it is not reachable from the network stack or unauthenticated remote protocols.\nAC:L - An attacker who can open the i2c device and induce adapter teardown (e.g., USB-I2C hot-unplug on a kiosk/shared system, or concurrent close while deletion awaits the final ref) controls both sides of the race, so success does not depend on unpredictable victim state.\nPR:L - Exploitation requires access to /dev/i2c-*, which in the most severe realistic deployments (embedded, Raspberry Pi, industrial/Android HALs) is granted to an unprivileged i2c-group user rather than full root; no init-namespace admin capability is required for the open/close side.\nUI:N - No separate victim action is required; the attacker performs the open/close and can trigger or participate in adapter removal themselves.\nS:U - This is a standard kernel memory-corruption/privilege-escalation issue within the host kernel's security authority; it does not cross VM, IOMMU, or other security boundaries.\nC:H - Use-after-free of the i2c_adapter object enables heap reuse and attacker-controlled object contents, which can be leveraged for arbitrary kernel memory disclosure.\nI:H - The same UAF primitive supports heap spraying and corruption of reused kernel objects, enabling arbitrary write and control-flow hijacking / code execution in kernel context.\nA:H - Dereferencing the freed adapter (and subsequent corrupted state) can cause kernel oops/panic or otherwise crash the system, fully impacting availability."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T08:43:46.382Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"4.14.291"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"4.19.256"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"5.4.211"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"5.10.137"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"5.15.61"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"5.18.18"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"5.19.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.3","versionEndExcluding":"6.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/e6412ba3b6508bdf9c074d310bf4144afa6aec1a","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/23a191b132cd87f746c62f3dc27da33683d85829","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/871a1e94929a27bf6e2cd99523865c840bbc2d87","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/81cb31756888bb062e92d2dca21cd629d77a46a9","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/35927d7509ab9bf41896b7e44f639504eae08af7","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e8e1a046cf87c8b1363e5de835114f2779e2aaf4","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/12b0606000d0828630c033bf0c74c748464fe87d","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/e4c72c06c367758a14f227c847f9d623f1994ecf","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-05T03:00:19.248Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2024-08-19T18:51:49.719341Z","id":"CVE-2019-25162","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-08-19T18:51:57.708Z"}}]}}}