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