summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/syscon.h
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2020-02-04 13:28:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-28 16:38:48 +0100
commit0a3aca3a0f415a9855ae113b3ec72da9828744c4 (patch)
tree301daba05f02780873648855067641ecd8dd77ea /include/linux/platform_data/syscon.h
parent4512119ac90a9d438837f4b528a9e7d7d26e8bef (diff)
x86/mce/amd: Publish the bank pointer only after setup has succeeded
commit 6e5cf31fbe651bed7ba1df768f2e123531132417 upstream. threshold_create_bank() creates a bank descriptor per MCA error thresholding counter which can be controlled over sysfs. It publishes the pointer to that bank in a per-CPU variable and then goes on to create additional thresholding blocks if the bank has such. However, that creation of additional blocks in allocate_threshold_blocks() can fail, leading to a use-after-free through the per-CPU pointer. Therefore, publish that pointer only after all blocks have been setup successfully. Fixes: 019f34fccfd5 ("x86, MCE, AMD: Move shared bank to node descriptor") Reported-by: Saar Amar <Saar.Amar@microsoft.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/20200128140846.phctkvx5btiexvbx@kili.mountain Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/platform_data/syscon.h')
0 files changed, 0 insertions, 0 deletions