{"id":"CVE-2026-74643","state":"PUBLISHED","title":"samples/damon/mtier: error out for zero quota goal target values","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nsamples/damon/mtier: error out for zero quota goal target values\n\nPatch series \"mm/damon: avoid division by zero from damos_quota_score()\".\n\nDAMON_SAMPLE_MTIER and DAMON_LRU_SORT allow the user to trigger division\nby zero in damos_quota_score().  Avoid it by adding parameters validation\nchecks.\n\n\nThis patch (of 2):\n\ndamos_quota_score() can trigger division by zero if the target_value is\nzero.  DAMON_SAMPLE_MTIER lets users set the target_value via\nnode0_mem_{used,free}_bp parameters.  It doesn't guard zero value case,\nthough.  As a result, users can trigger division by zero.  Fix the issue\nby returning an error when the user tries to start DAMON with zero\nnode0_mem_{used,free}_bp parameter values.\n\nDAMON_SAMPLE_MTIER is just a sample module, but the consequence is quite\nbad.  Also the zero node0_mem_free_bp parameter might look like a\nreasonable setup to some users.  Hence, the issue might really happen in\nthe real world.\n\nOne reliable way to reproduce the issue is like below:\n\n    # cd /sys/module/damon_sample_mtier/parameters\n    # echo 4096 > node0_start_addr\n    # echo 8192 > node0_end_addr\n    # echo 8192 > node1_start_addr\n    # echo 81920 > node1_end_addr\n    # echo 0 > node0_mem_free_bp\n    # echo Y > enabled\n    # dmesg -w\n    [...]\n    [18792.235916] Oops: divide error: 0000 [#1] SMP NOPTI\n    [...]\n    [18792.242787] RIP: 0010:damos_quota_score+0x6f/0x480\n    [...]\n\nThis issue was discovered [1] by Sashiko.","publishedAt":"2026-08-22T15:32:21.140Z","updatedAt":"2026-08-22T15:32:21.140Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c5e67d40a10234541e220750297304df79aaedd0","status":"affected","lessThan":"e16b8d640ec99b28bc827560edcf9706e610c3aa","versionType":"git"},{"version":"c5e67d40a10234541e220750297304df79aaedd0","status":"affected","lessThan":"684f271210becd7b8c4088f06c442499e48a43a0","versionType":"git"},{"version":"c5e67d40a10234541e220750297304df79aaedd0","status":"affected","lessThan":"a16fd3ad9d89b05475864da97327870464611736","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["samples/damon/mtier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.45","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.9","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["samples/damon/mtier.c"]}],"references":["https://git.kernel.org/stable/c/e16b8d640ec99b28bc827560edcf9706e610c3aa","https://git.kernel.org/stable/c/684f271210becd7b8c4088f06c442499e48a43a0","https://git.kernel.org/stable/c/a16fd3ad9d89b05475864da97327870464611736"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:58.252Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/74xxx/CVE-2026-74643.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-74643","state":"PUBLISHED","datePublished":"2026-08-22T15:32:21.140Z","dateUpdated":"2026-08-22T15:32:21.140Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-15T05:44:03.922Z"},"containers":{"cna":{"title":"samples/damon/mtier: error out for zero quota goal target values","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsamples/damon/mtier: error out for zero quota goal target values\n\nPatch series \"mm/damon: avoid division by zero from damos_quota_score()\".\n\nDAMON_SAMPLE_MTIER and DAMON_LRU_SORT allow the user to trigger division\nby zero in damos_quota_score().  Avoid it by adding parameters validation\nchecks.\n\n\nThis patch (of 2):\n\ndamos_quota_score() can trigger division by zero if the target_value is\nzero.  DAMON_SAMPLE_MTIER lets users set the target_value via\nnode0_mem_{used,free}_bp parameters.  It doesn't guard zero value case,\nthough.  As a result, users can trigger division by zero.  Fix the issue\nby returning an error when the user tries to start DAMON with zero\nnode0_mem_{used,free}_bp parameter values.\n\nDAMON_SAMPLE_MTIER is just a sample module, but the consequence is quite\nbad.  Also the zero node0_mem_free_bp parameter might look like a\nreasonable setup to some users.  Hence, the issue might really happen in\nthe real world.\n\nOne reliable way to reproduce the issue is like below:\n\n    # cd /sys/module/damon_sample_mtier/parameters\n    # echo 4096 > node0_start_addr\n    # echo 8192 > node0_end_addr\n    # echo 8192 > node1_start_addr\n    # echo 81920 > node1_end_addr\n    # echo 0 > node0_mem_free_bp\n    # echo Y > enabled\n    # dmesg -w\n    [...]\n    [18792.235916] Oops: divide error: 0000 [#1] SMP NOPTI\n    [...]\n    [18792.242787] RIP: 0010:damos_quota_score+0x6f/0x480\n    [...]\n\nThis issue was discovered [1] by Sashiko."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"c5e67d40a10234541e220750297304df79aaedd0","status":"affected","lessThan":"e16b8d640ec99b28bc827560edcf9706e610c3aa","versionType":"git"},{"version":"c5e67d40a10234541e220750297304df79aaedd0","status":"affected","lessThan":"684f271210becd7b8c4088f06c442499e48a43a0","versionType":"git"},{"version":"c5e67d40a10234541e220750297304df79aaedd0","status":"affected","lessThan":"a16fd3ad9d89b05475864da97327870464611736","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["samples/damon/mtier.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.45","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.9","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["samples/damon/mtier.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/e16b8d640ec99b28bc827560edcf9706e610c3aa"},{"url":"https://git.kernel.org/stable/c/684f271210becd7b8c4088f06c442499e48a43a0"},{"url":"https://git.kernel.org/stable/c/a16fd3ad9d89b05475864da97327870464611736"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-22T15:32:21.140Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.45"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.1.9"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}