In the Linux kernel, the following vulnerability has been resolved: mm: swap: fix potential buffer overflow in setupclusters() In setupswapmap(), we only ensure badpages are in range (0, lastpage]. As maxpages might be < lastpage, setupclusters() will encounter a buffer overflow when a badpage is >= maxpages. Only call incclusterinfo_page() for badpage which is < maxpages to fix the issue.