{"id":"CVE-2026-31524","state":"PUBLISHED","title":"HID: asus: avoid memory leak in asus_report_fixup()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: asus: avoid memory leak in asus_report_fixup()\n\nThe asus_report_fixup() function was returning a newly allocated\nkmemdup()-allocated buffer, but never freeing it.  Switch to\ndevm_kzalloc() to ensure the memory is managed and freed automatically\nwhen the device is removed.\n\nThe caller of report_fixup() does not take ownership of the returned\npointer, but it is permitted to return a pointer whose lifetime is at\nleast that of the input buffer.\n\nAlso fix a harmless out-of-bounds read by copying only the original\ndescriptor size.","publishedAt":"2026-04-22T13:54:38.389Z","updatedAt":"2026-05-11T22:10:27.784Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"726765b43deb2b4723869d673cc5fc6f7a3b2059","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"ede95cfcab8064d9a08813fbd7ed42cea8843dcf","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"2e4fe6b15c2f390c023b20d728b1a3fe7ea4f973","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"f20f17cffbe34fb330267e0f8084f5565f807444","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"7a6d6e4d8af044f94fa97e97af5ff2771e1fbebd","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"a41cc7c1668e44ff2c2d36f9a6353253ffc43e3c","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"84724ac4821a160d47b84289adf139023027bdbb","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"2bad24c17742fc88973d6aea526ce1353f5334a3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-asus.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.14","versionType":"semver"},{"version":"5.10.253","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.203","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.168","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.131","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.80","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.21","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.11","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-asus.c"]}],"references":["https://git.kernel.org/stable/c/726765b43deb2b4723869d673cc5fc6f7a3b2059","https://git.kernel.org/stable/c/ede95cfcab8064d9a08813fbd7ed42cea8843dcf","https://git.kernel.org/stable/c/2e4fe6b15c2f390c023b20d728b1a3fe7ea4f973","https://git.kernel.org/stable/c/f20f17cffbe34fb330267e0f8084f5565f807444","https://git.kernel.org/stable/c/7a6d6e4d8af044f94fa97e97af5ff2771e1fbebd","https://git.kernel.org/stable/c/a41cc7c1668e44ff2c2d36f9a6353253ffc43e3c","https://git.kernel.org/stable/c/84724ac4821a160d47b84289adf139023027bdbb","https://git.kernel.org/stable/c/2bad24c17742fc88973d6aea526ce1353f5334a3"],"weaknesses":[],"ingestedAt":"2026-10-29T20:11:40.391Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/31xxx/CVE-2026-31524.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-31524","state":"PUBLISHED","datePublished":"2026-04-22T13:54:38.389Z","dateUpdated":"2026-05-11T22:10:27.784Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-03-09T15:48:24.110Z"},"containers":{"cna":{"title":"HID: asus: avoid memory leak in asus_report_fixup()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nHID: asus: avoid memory leak in asus_report_fixup()\n\nThe asus_report_fixup() function was returning a newly allocated\nkmemdup()-allocated buffer, but never freeing it.  Switch to\ndevm_kzalloc() to ensure the memory is managed and freed automatically\nwhen the device is removed.\n\nThe caller of report_fixup() does not take ownership of the returned\npointer, but it is permitted to return a pointer whose lifetime is at\nleast that of the input buffer.\n\nAlso fix a harmless out-of-bounds read by copying only the original\ndescriptor size."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"726765b43deb2b4723869d673cc5fc6f7a3b2059","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"ede95cfcab8064d9a08813fbd7ed42cea8843dcf","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"2e4fe6b15c2f390c023b20d728b1a3fe7ea4f973","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"f20f17cffbe34fb330267e0f8084f5565f807444","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"7a6d6e4d8af044f94fa97e97af5ff2771e1fbebd","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"a41cc7c1668e44ff2c2d36f9a6353253ffc43e3c","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"84724ac4821a160d47b84289adf139023027bdbb","versionType":"git"},{"version":"5703e52cc711bc01e72cf12b86a126909c79d213","status":"affected","lessThan":"2bad24c17742fc88973d6aea526ce1353f5334a3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-asus.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.14","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.14","versionType":"semver"},{"version":"5.10.253","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.203","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.168","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.131","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.80","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.21","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"6.19.11","status":"unaffected","lessThanOrEqual":"6.19.*","versionType":"semver"},{"version":"7.0","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/hid/hid-asus.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/726765b43deb2b4723869d673cc5fc6f7a3b2059"},{"url":"https://git.kernel.org/stable/c/ede95cfcab8064d9a08813fbd7ed42cea8843dcf"},{"url":"https://git.kernel.org/stable/c/2e4fe6b15c2f390c023b20d728b1a3fe7ea4f973"},{"url":"https://git.kernel.org/stable/c/f20f17cffbe34fb330267e0f8084f5565f807444"},{"url":"https://git.kernel.org/stable/c/7a6d6e4d8af044f94fa97e97af5ff2771e1fbebd"},{"url":"https://git.kernel.org/stable/c/a41cc7c1668e44ff2c2d36f9a6353253ffc43e3c"},{"url":"https://git.kernel.org/stable/c/84724ac4821a160d47b84289adf139023027bdbb"},{"url":"https://git.kernel.org/stable/c/2bad24c17742fc88973d6aea526ce1353f5334a3"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T22:10:27.784Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.10.253"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"5.15.203"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"6.1.168"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"6.6.131"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"6.12.80"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"6.18.21"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"6.19.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.14","versionEndExcluding":"7.0"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}