Description
In the Linux kernel, the following vulnerability has been resolved: dm-stats: fix a crash if allocation of per-cpu data fails If "dm_kvzalloc(percpu_alloc_size, cpu_to_node(cpu))" fails, the code jumps to the "out" label and calls dm_stat_free. dm_stat_free does "for_each_possible_cpu(cpu) { dm_kvfree(s->stat_percpu[cpu][0].histogram, s->histogram_alloc_size);", which crashes with NULL pointer dereference if s->stat_percpu[cpu] is NULL. This commit fixes the bug by testing s->stat_percpu[cpu] for NULL before using it.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
fd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < e45f0b0c41139810ff395ba2f3cfca1460a5b8a6affectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < 9805d87d0e26c68ee69da3928e665214d2e2851aaffectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < 564d17573ef643c13cf6e9015124a205fa65e704affectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < 389a50d094e13724f5f45e6d9d6ef734c98ba291affectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < c3f211b7a277dd404b4e7d23095be964b5b46a27affectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < 74210fa072960a18bb0eead487585452af722e4faffectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < 0c8f7870ed3ebd512f090d7714cc2c556b9e5c75affectedfd2ed4d252701d3bbed4cd3e3d267ad469bb832a to < cc87e26d9cce22061dc21e51e11afef29dbbc36aaffected
Linux Linux
Default version status: affected
3.12affected0 to < 3.12unaffected5.10.270 to ≤ 5.10.*unaffected5.15.221 to ≤ 5.15.*unaffected6.1.188 to ≤ 6.1.*unaffected6.6.157 to ≤ 6.6.*unaffected6.12.109 to ≤ 6.12.*unaffected6.18.50 to ≤ 6.18.*unaffected7.2.4 to ≤ 7.2.*unaffected7.3 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/e45f0b0c41139810ff395ba2f3cfca1460a5b8a6 ↗
- https://git.kernel.org/stable/c/9805d87d0e26c68ee69da3928e665214d2e2851a ↗
- https://git.kernel.org/stable/c/564d17573ef643c13cf6e9015124a205fa65e704 ↗
- https://git.kernel.org/stable/c/389a50d094e13724f5f45e6d9d6ef734c98ba291 ↗
- https://git.kernel.org/stable/c/c3f211b7a277dd404b4e7d23095be964b5b46a27 ↗
- https://git.kernel.org/stable/c/74210fa072960a18bb0eead487585452af722e4f ↗
- https://git.kernel.org/stable/c/0c8f7870ed3ebd512f090d7714cc2c556b9e5c75 ↗
- https://git.kernel.org/stable/c/cc87e26d9cce22061dc21e51e11afef29dbbc36a ↗