s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex
Reservation of the PMU hardware is done at first event creation and is protected by a pair of mutex_lock() and mutex_unlock(). After reservation of the PMU hardware the memory required for the PMUs the event is to be installed on is allocated by allocate_buffers() and alloc_sampling_buffer(). This done outside of the mutex protection. Without mutex protection two or more concurrent invocations of perf_event_init() may run in parallel. This can lead to allocation of Sample Data Blocks (SDBs) multiple times for the same PMU. Prevent this and protect memory allocation of SDBs by mutex.
From the CVE record · Linux
In the Linux kernel's s390/cpum_sf component, SDB memory allocation was not protected by the PMU reservation mutex. Concurrent perf event initialization can allocate SDBs multiple times for the same PMU. The input does not specify access, authentication, or user-interaction requirements.
Engineers running Linux kernels with the s390/cpum_sf component should check their kernel version; affected versions are not specified.