{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2022-49285","id":"CVE-2022-49285","title":"iio: accel: mma8452: use the correct logic to get mma8452_data","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: accel: mma8452: use the correct logic to get mma8452_data\n\nThe original logic to get mma8452_data is wrong, the *dev point to\nthe device belong to iio_dev. we can't use this dev to find the\ncorrect i2c_client. The original logic happen to work because it\nfinally use dev->driver_data to get iio_dev. Here use the API\nto_i2c_cl","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: accel: mma8452: use the correct logic to get mma8452_data\n\nThe original logic to get mma8452_data is wrong, the *dev point to\nthe device belong to iio_dev. we can't use this dev to find the\ncorrect i2c_client. The original logic happen to work because it\nfinally use dev->driver_data to get iio_dev. Here use the API\nto_i2c_client() is wrong and make reader confuse. To correct the\nlogic, it should be like this\n\n  struct mma8452_data *data = iio_priv(dev_get_drvdata(dev));\n\nBut after commit 8b7651f25962 (\"iio: iio_device_alloc(): Remove\nunnecessary self drvdata\"), the upper logic also can't work.\nWhen try to show the avialable scale in userspace, will meet kernel\ndump, kernel handle NULL pointer dereference.\n\nSo use dev_to_iio_dev() to correct the logic.\n\nDual fixes tags as the second reflects when the bug was exposed, whilst\nthe first reflects when the original bug was introduced.","published":"2025-02-26T01:56:25.096Z","updated":"2026-10-28T02:30:40.724818047Z","reserved":"2025-02-26T01:49:39.298Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":5.5,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","rating":"medium","source":"NVD"}],"rating":"medium","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c3cdd6e48e35b7a02f28e301ef30a87ff3cd6527","lessThan":"4c0bb583a4444cce224e8661090cbffc98e2fe07","status":"affected","versionType":"git"},{"version":"c3cdd6e48e35b7a02f28e301ef30a87ff3cd6527","lessThan":"d2d9ebdbff79d87d27652578e6d1638ad3b5f3bf","status":"affected","versionType":"git"},{"version":"c3cdd6e48e35b7a02f28e301ef30a87ff3cd6527","lessThan":"c87b7b12f48db86ac9909894f4dc0107d7df6375","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.4","status":"affected"},{"version":"0","lessThan":"4.4","status":"unaffected","versionType":"semver"},{"version":"5.15.54","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"5.17.2","lessThanOrEqual":"5.17.*","status":"unaffected","versionType":"semver"},{"version":"5.18","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-476"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/4c0bb583a4444cce224e8661090cbffc98e2fe07","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/d2d9ebdbff79d87d27652578e6d1638ad3b5f3bf","tags":["Patch","web"]},{"url":"https://git.kernel.org/stable/c/c87b7b12f48db86ac9909894f4dc0107d7df6375","tags":["Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49285.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49285","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.00258,"epssPercentile":0.17642,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2022-49285","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49285","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2022-49285","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2022-49285","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}