summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAnthony Krowiak <akrowiak@linux.ibm.com>2026-08-12 16:02:37 -0400
committerChristian Borntraeger <borntraeger@linux.ibm.com>2026-08-13 16:04:33 +0200
commitbf09b9d7cd7890bc3a3b7eb63d5ece15f88bfde7 (patch)
tree36d4c143bd6897f6e5d62887d35e9c3293edda66 /include/linux
parent6b8a02e216f6b520cc029e43ddc83956605135d5 (diff)
s390/vfio-ap: fix potential use of uninitialized apm_filtered bitmap
The DECLARE_BITMAP(apm_filtered, AP_DEVICES) macro allocates the bitmap on the stack without zero-initializing it. In vfio_ap_mdev_hot_plug_cfg(), the vfio_ap_mdev_filter_matrix() function is only called to initialize and populate apm_filtered if either filter_adapters or filter_domains is true. If the hot plug configuration change only adds control domains (meaning filter_cdoms is true, but filter_adapters and filter_domains are both false), vfio_ap_mdev_filter_matrix() is bypassed. Consequently, apm_filtered is passed to reset_queues_for_apids() with uninitialized stack garbage. This can cause reset_queues_for_apids() to interpret arbitrary stack garbage bits as valid APIDs to reset, potentially performing unintended guest hardware queue resets. Fix this by zero-initializing the apm_filtered bitmap at the beginning of vfio_ap_mdev_hot_plug_cfg() using bitmap_zero(). Fixes: eeb386aeb5b7c ("s390/vfio-ap: handle config changed and scan complete notification") Cc: stable@vger.kernel.org Signed-off-by: Anthony Krowiak <akrowiak@linux.ibm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions