In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Fix memory leak of PBLE objects
On rmmod of irdma, the PBLE object memory is not being freed. PBLE object memory are not statically pre-allocated at function initialization time unlike other HMC objects. PBLEs objects and the Segment Descriptors (SD) for it can be dynamically allocated during scale up and SD's remain allocated till function deinitialization.
Fix this leak by adding IRDMAHMCIWPBLE to the iwhmcobjtypes[] table and skip pbles in irdmacreatehmcobj but not in irdmadelhmcobjects().
In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Cap MSIX used to online CPUs + 1
The irdma driver can use a maximum number of msix vectors equal to numonlinecpus() + 1 and the kernel warning stack below is shown if that number is exceeded.
The kernel throws a warning as the driver tries to update the affinity hint with a CPU mask greater than the max CPU IDs. Fix this by capping the MSIX vectors to numonlinecpus() + 1.
WARNING: CPU: 7 PID: 23655 at include/linux/cpumask.h:106 irdmacfgceqvector+0x34c/0x3f0 [irdma] RIP: 0010:irdmacfgceqvector+0x34c/0x3f0 [irdma] Call Trace: irdmartinithw+0xa62/0x1290 [irdma] ? irdmaalloclocalmacentry+0x1a0/0x1a0 [irdma] ? iskernelpercpuaddress+0x63/0x310 ? rcureadlockheldcommon+0xe/0xb0 ? irdmalanunregisterqset+0x280/0x280 [irdma] ? irdmarequestreset+0x80/0x80 [irdma] ? icegetqosparams+0x84/0x390 [ice] irdmaprobe+0xa40/0xfc0 [irdma] ? rcureadlockbhheld+0xd0/0xd0 ? irdmaremove+0x140/0x140 [irdma] ? rcureadlockschedheld+0x62/0xe0 ? downwrite+0x187/0x3d0 ? auxiliarymatchid+0xf0/0x1a0 ? irdmaremove+0x140/0x140 [irdma] auxiliarybusprobe+0xa6/0x100 driverprobedevice+0x4a4/0xd50 ? deviceattachdriver+0x2c0/0x2c0 driverprobedevice+0x4a/0x110 driverattach+0x1aa/0x350 busforeachdev+0x11d/0x1b0 ? subsysdeviterinit+0xe0/0xe0 busadddriver+0x3b1/0x610 driverregister+0x18e/0x410 ? 0xffffffffc0b88000 irdmainitmodule+0x50/0xaa [irdma] dooneinitcall+0x103/0x5f0 ? perftraceinitcalllevel+0x420/0x420 ? doinitmodule+0x4e/0x700 ? kasankmalloc+0x7d/0xa0 ? kmemcachealloctrace+0x188/0x2b0 ? kasanunpoison+0x21/0x50 doinitmodule+0x1d1/0x700 loadmodule+0x3867/0x5260 ? layoutandallocate+0x3990/0x3990 ? rcureadlockheldcommon+0xe/0xb0 ? rcureadlockschedheld+0x62/0xe0 ? rcureadlockbhheld+0xd0/0xd0 ? vmallocnoderange+0x46b/0x890 ? lockrelease+0x5c8/0xba0 ? allocvmarea+0x120/0x120 ? selinuxkernelmodulefromfile+0x2a5/0x300 ? inodesecurityrevalidate+0xf0/0xf0 ? dosysinitmodule+0x1db/0x260 dosysinitmodule+0x1db/0x260 ? loadmodule+0x5260/0x5260 ? dosyscall64+0x22/0x450 dosyscall64+0xa5/0x450 entrySYSCALL64afterhwframe+0x66/0xdb