{"id":"CVE-2021-47172","state":"PUBLISHED","title":"iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers","description":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: adc: ad7124: Fix potential overflow due to non sequential channel numbers\n\nChannel numbering must start at 0 and then not have any holes, or\nit is possible to overflow the available storage.  Note this bug was\nintroduced as part of a fix to ensure we didn't rely on the ordering\nof child nodes.  So we need to support arbitrary ordering but they all\nneed to be there somewhere.\n\nNote I hit this when using qemu to test the rest of this series.\nArguably this isn't the best fix, but it is probably the most minimal\noption for backporting etc.\n\nAlexandru's sign-off is here because he carried this patch in a larger\nset that Jonathan then applied.","publishedAt":"2024-03-25T09:16:23.741Z","updatedAt":"2026-05-23T15:19:26.911Z","severity":{"score":5.5,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","source":"CISA-ADP"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5408cbc6337300d6f1a87c797273c535ed96305a","status":"affected","lessThan":"f49149964d2423fb618fb6b755bb1eaa431cca2c","versionType":"git"},{"version":"d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4","status":"affected","lessThan":"f70122825076117787b91e7f219e21c09f11a5b9","versionType":"git"},{"version":"d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4","status":"affected","lessThan":"26da8040eccc6c6b0e415e9a3baf72fd39eb2fdc","versionType":"git"},{"version":"d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4","status":"affected","lessThan":"f2a772c51206b0c3f262e4f6a3812c89a650191b","versionType":"git"},{"version":"5.4.14","status":"affected","lessThan":"5.4.124","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/adc/ad7124.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.5","versionType":"semver"},{"version":"5.4.124","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.42","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.12.9","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/adc/ad7124.c"]}],"references":["https://git.kernel.org/stable/c/f49149964d2423fb618fb6b755bb1eaa431cca2c","https://git.kernel.org/stable/c/f70122825076117787b91e7f219e21c09f11a5b9","https://git.kernel.org/stable/c/26da8040eccc6c6b0e415e9a3baf72fd39eb2fdc","https://git.kernel.org/stable/c/f2a772c51206b0c3f262e4f6a3812c89a650191b"],"weaknesses":["CWE-120"],"ingestedAt":"2026-10-29T19:49:19.404Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/47xxx/CVE-2021-47172.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2021-47172","state":"PUBLISHED","datePublished":"2024-03-25T09:16:23.741Z","dateUpdated":"2026-05-23T15:19:26.911Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-03-25T09:12:14.111Z"},"containers":{"cna":{"title":"iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\niio: adc: ad7124: Fix potential overflow due to non sequential channel numbers\n\nChannel numbering must start at 0 and then not have any holes, or\nit is possible to overflow the available storage.  Note this bug was\nintroduced as part of a fix to ensure we didn't rely on the ordering\nof child nodes.  So we need to support arbitrary ordering but they all\nneed to be there somewhere.\n\nNote I hit this when using qemu to test the rest of this series.\nArguably this isn't the best fix, but it is probably the most minimal\noption for backporting etc.\n\nAlexandru's sign-off is here because he carried this patch in a larger\nset that Jonathan then applied."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5408cbc6337300d6f1a87c797273c535ed96305a","status":"affected","lessThan":"f49149964d2423fb618fb6b755bb1eaa431cca2c","versionType":"git"},{"version":"d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4","status":"affected","lessThan":"f70122825076117787b91e7f219e21c09f11a5b9","versionType":"git"},{"version":"d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4","status":"affected","lessThan":"26da8040eccc6c6b0e415e9a3baf72fd39eb2fdc","versionType":"git"},{"version":"d7857e4ee1ba69732b16c73b2f2dde83ecd78ee4","status":"affected","lessThan":"f2a772c51206b0c3f262e4f6a3812c89a650191b","versionType":"git"},{"version":"5.4.14","status":"affected","lessThan":"5.4.124","versionType":"semver"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/adc/ad7124.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.5","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.5","versionType":"semver"},{"version":"5.4.124","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.42","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.12.9","status":"unaffected","lessThanOrEqual":"5.12.*","versionType":"semver"},{"version":"5.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/iio/adc/ad7124.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/f49149964d2423fb618fb6b755bb1eaa431cca2c"},{"url":"https://git.kernel.org/stable/c/f70122825076117787b91e7f219e21c09f11a5b9"},{"url":"https://git.kernel.org/stable/c/26da8040eccc6c6b0e415e9a3baf72fd39eb2fdc"},{"url":"https://git.kernel.org/stable/c/f2a772c51206b0c3f262e4f6a3812c89a650191b"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-23T15:19:26.911Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.4.14","versionEndExcluding":"5.4.124"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.10.42"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.12.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.5","versionEndExcluding":"5.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":5.5,"attackVector":"LOCAL","baseSeverity":"MEDIUM","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","integrityImpact":"NONE","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"NONE"}},{"other":{"type":"ssvc","content":{"timestamp":"2024-07-17T17:18:44.850824Z","id":"CVE-2021-47172","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-120","type":"CWE","lang":"en","description":"CWE-120 Buffer Copy without Checking Size of Input ('Classic Buffer Overflow')"}]}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-11-06T15:29:32.072Z"}},{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/f49149964d2423fb618fb6b755bb1eaa431cca2c","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f70122825076117787b91e7f219e21c09f11a5b9","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/26da8040eccc6c6b0e415e9a3baf72fd39eb2fdc","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/f2a772c51206b0c3f262e4f6a3812c89a650191b","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-04T05:24:40.144Z"}}]}}}