Bugzilla – Bug 970504
VUL-0: CVE-2016-2143: kernel-source: s390x memory corruption on fork with large page tables
Last modified: 2017-01-13 14:02:02 UTC
CVE-2016-2143 (more information in next comments) References: http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2143
https://lkml.org/lkml/2016/3/10/75 - The fix for the page table corruption (CVE-2016-2143)
open bug
Description: kernel: fork of a large process causes memory corruption Symptom: The fork of a process with four page table levels will cause memory corruption with a variety of symptoms. Problem: All processes are created with a three level page table and an limit of 4TB for the address space. If the parent process has four page table levels with a limit of 8PB the function that duplicates the address space will try to copy memory areas outside of the address space limit for the child process. This leads to memory clobbers. Solution: Create the child process with the same number of page table levels as the parent. Reproduction: Map a large memory area with the mmap() call and then call fork(). Upstream-Description: s390/mm: four page table levels vs. fork The fork of a process with four page table levels is broken since git commit 6252d702c5311ce9 "[S390] dynamic page tables." All new mm contexts are created with three page table levels and an asce limit of 4TB. If the parent has four levels dup_mmap will add vmas to the new context which are outside of the asce limit. The subsequent call to copy_page_range will walk the three level page table structure of the new process with non-zero pgd and pud indexes. This leads to memory clobbers as the pgd_index *and* the pud_index is added to the mm->pgd pointer without a pgd_deref in between. The init_new_context() function is selecting the number of page table levels for a new context. The function is used by mm_init() which in turn is called by dup_mm() and mm_alloc(). These two are used by fork() and exec(). The init_new_context() function can distinguish the two cases by looking at mm->context.asce_limit, for fork() the mm struct has been copied and the number of page table levels may not change. For exec() the mm_alloc() function set the new mm structure to zero, in this case a three-level page table is created as the temporary stack space is located at STACK_TOP_MAX = 4TB.
Created attachment 668556 [details] s390-sles11sp4-cve-2016-2143-fork-pgtable.patch Backport for SLES 11 SP4.
Created attachment 668557 [details] s390-sles12sp1-cve-2016-2143-fork-pgtable.patch Backport for SLES 12 SP1.
bugbot adjusting priority
I have reviewed and submitted the two patches to users/jjolly/SLE11-SP4/for-next and users/jjolly/SLE12-SP1/for-next for pulling. As this is a security fix, I will not close as fixed, but rather set to needinfo for Marcus Meissner.
how about sle12 ga, sle11 sp2/sp3 ltss? is that affected? can you perhaps put this into the cve 3.0 branch for sle11 instead? once done, please reassign this bug to security-team@suse.de
(In reply to Marcus Meissner from comment #8) > how about sle12 ga, sle11 sp2/sp3 ltss? is that affected? Yes, those would also be affected, the patches should also apply there.
Patch submitted to: SLE11-SP2-LTSS SLE11-SP3 SLE11-SP4 SLE12 SLE12-SP1 Marcus, Will this automatically be merged to SLE12-SP2? If not, I will manually add it to SLE12-SP2.
sles12 sp2 needs it, as we use kernel 4.4 there (might be coming from stable or not, but it will be merged in that case).
*** Bug 971081 has been marked as a duplicate of this bug. ***
Hi John, the SLES 11 SP4 kotd as of kernel-source-3.0.101-216.1.ge61f9dc.src.rpm 16-Mar-2016 08:15 118M says: " Sat Mar 12 07:17:59 CET 2016 - jjolly@suse.de - s390/mm: four page table levels vs. fork (bnc#970504, LTC#138810, CVE-2016-2143). - commit b6e66bd ------------------------------------------------------------------- Fri Mar 11 00:34:11 CET 2016 - jjolly@suse.de - s390/mm: four page table levels vs. fork (bnc#970504, LTC#138810, CVE-2016-2143). - commit 1a61a61 " The March 12 entry has the same timestamp as the one in the SLES 11 SP3 kotd. This may not be a problem, just for your awareness.
SUSE-SU-2016:1203-1: An update that solves 41 vulnerabilities and has 49 fixes is now available. Category: security (important) Bug References: 758040,781018,879378,879381,904035,924919,934787,935123,937444,939955,940017,940413,940913,940946,941514,942082,946122,947128,948330,949298,949752,949936,950750,950998,951392,952976,954628,955308,955354,955654,955673,956375,956514,956707,956708,956709,956852,956949,957988,957990,958463,958886,958906,958912,958951,959190,959312,959399,959705,960857,961500,961509,961512,961516,961518,963276,963765,963767,963998,964201,965319,965923,966437,966693,967863,967972,967973,967974,967975,968010,968011,968012,968013,968141,968670,969307,970504,970892,970909,970911,970948,970956,970958,970970,971124,971125,971360,973570,974646,975945 CVE References: CVE-2013-7446,CVE-2015-7509,CVE-2015-7515,CVE-2015-7550,CVE-2015-7566,CVE-2015-7799,CVE-2015-8215,CVE-2015-8539,CVE-2015-8543,CVE-2015-8550,CVE-2015-8551,CVE-2015-8552,CVE-2015-8569,CVE-2015-8575,CVE-2015-8767,CVE-2015-8785,CVE-2015-8812,CVE-2015-8816,CVE-2016-0723,CVE-2016-2069,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2188,CVE-2016-2384,CVE-2016-2543,CVE-2016-2544,CVE-2016-2545,CVE-2016-2546,CVE-2016-2547,CVE-2016-2548,CVE-2016-2549,CVE-2016-2782,CVE-2016-2847,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156,CVE-2016-3955 Sources used: SUSE OpenStack Cloud 5 (src): kernel-bigsmp-3.0.101-0.47.79.1, kernel-default-3.0.101-0.47.79.1, kernel-ec2-3.0.101-0.47.79.1, kernel-source-3.0.101-0.47.79.1, kernel-syms-3.0.101-0.47.79.1, kernel-trace-3.0.101-0.47.79.1, kernel-xen-3.0.101-0.47.79.1 SUSE Manager Proxy 2.1 (src): kernel-bigsmp-3.0.101-0.47.79.1, kernel-default-3.0.101-0.47.79.1, kernel-ec2-3.0.101-0.47.79.1, kernel-source-3.0.101-0.47.79.1, kernel-syms-3.0.101-0.47.79.1, kernel-trace-3.0.101-0.47.79.1, kernel-xen-3.0.101-0.47.79.1 SUSE Manager 2.1 (src): kernel-bigsmp-3.0.101-0.47.79.1, kernel-default-3.0.101-0.47.79.1, kernel-ec2-3.0.101-0.47.79.1, kernel-source-3.0.101-0.47.79.1, kernel-syms-3.0.101-0.47.79.1, kernel-trace-3.0.101-0.47.79.1, kernel-xen-3.0.101-0.47.79.1 SUSE Linux Enterprise Server 11-SP3-LTSS (src): kernel-bigsmp-3.0.101-0.47.79.1, kernel-default-3.0.101-0.47.79.1, kernel-ec2-3.0.101-0.47.79.1, kernel-pae-3.0.101-0.47.79.1, kernel-source-3.0.101-0.47.79.1, kernel-syms-3.0.101-0.47.79.1, kernel-trace-3.0.101-0.47.79.1, kernel-xen-3.0.101-0.47.79.1 SUSE Linux Enterprise Server 11-EXTRA (src): kernel-bigsmp-3.0.101-0.47.79.1, kernel-default-3.0.101-0.47.79.1, kernel-pae-3.0.101-0.47.79.1, kernel-ppc64-3.0.101-0.47.79.1, kernel-trace-3.0.101-0.47.79.1, kernel-xen-3.0.101-0.47.79.1 SUSE Linux Enterprise Debuginfo 11-SP3 (src): kernel-bigsmp-3.0.101-0.47.79.1, kernel-default-3.0.101-0.47.79.1, kernel-ec2-3.0.101-0.47.79.1, kernel-pae-3.0.101-0.47.79.1, kernel-trace-3.0.101-0.47.79.1, kernel-xen-3.0.101-0.47.79.1
This change is already in SLE12-SP2, so I believe the issue is resolved in all instances of the kernel. I am reassigning to Marcus to close if he approves. @tstaudt: The merge log entry right after the 12 Mar comment indicates that the sp3 patch was removed. I have verified this. Thanks for checking.
looks all good. releases will happen in the next months when the next regular schediuled updates come by.
SUSE-SU-2016:1672-1: An update that solves 29 vulnerabilities and has 61 fixes is now available. Category: security (important) Bug References: 676471,866130,898592,936530,940413,944309,946122,949752,953369,956491,956852,957986,957988,957990,959381,960458,960857,961512,961518,963762,963998,965319,965860,965923,966245,967863,967914,968010,968018,968141,968500,968566,968670,968687,969149,969391,969571,970114,970504,970892,970909,970911,970948,970956,970958,970970,971124,971125,971126,971360,971433,971446,971729,971944,971947,971989,972363,973237,973378,973556,973570,974646,974787,975358,975772,975945,976739,976868,978401,978821,978822,979213,979274,979347,979419,979548,979595,979867,979879,980371,980725,980788,980931,981231,981267,982532,982691,983143,983213,984107 CVE References: CVE-2015-7566,CVE-2015-8816,CVE-2016-0758,CVE-2016-1583,CVE-2016-2053,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2187,CVE-2016-2188,CVE-2016-2782,CVE-2016-2847,CVE-2016-3134,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156,CVE-2016-4482,CVE-2016-4485,CVE-2016-4486,CVE-2016-4565,CVE-2016-4569,CVE-2016-4578,CVE-2016-4580,CVE-2016-4805,CVE-2016-4913,CVE-2016-5244 Sources used: SUSE Linux Enterprise Software Development Kit 11-SP4 (src): kernel-docs-3.0.101-77.2 SUSE Linux Enterprise Server 11-SP4 (src): kernel-default-3.0.101-77.1, kernel-ec2-3.0.101-77.1, kernel-pae-3.0.101-77.1, kernel-ppc64-3.0.101-77.1, kernel-source-3.0.101-77.1, kernel-syms-3.0.101-77.1, kernel-trace-3.0.101-77.1, kernel-xen-3.0.101-77.1 SUSE Linux Enterprise Server 11-EXTRA (src): kernel-default-3.0.101-77.1, kernel-pae-3.0.101-77.1, kernel-ppc64-3.0.101-77.1, kernel-trace-3.0.101-77.1, kernel-xen-3.0.101-77.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): kernel-default-3.0.101-77.1, kernel-ec2-3.0.101-77.1, kernel-pae-3.0.101-77.1, kernel-ppc64-3.0.101-77.1, kernel-trace-3.0.101-77.1, kernel-xen-3.0.101-77.1
SUSE-SU-2016:1690-1: An update that solves 29 vulnerabilities and has 89 fixes is now available. Category: security (important) Bug References: 676471,880007,889207,899908,903279,928547,931448,940413,943989,944309,945345,947337,953233,954847,956491,956852,957805,957986,960857,962336,962846,962872,963193,963572,963762,964461,964727,965319,966054,966245,966573,966831,967251,967292,967299,967903,968010,968141,968448,968512,968667,968670,968687,968812,968813,969439,969571,969655,969690,969735,969992,969993,970062,970114,970504,970506,970604,970892,970909,970911,970948,970955,970956,970958,970970,971049,971124,971125,971126,971159,971170,971360,971600,971628,971947,972003,972174,972844,972891,972933,972951,973378,973556,973570,973855,974165,974308,974406,974418,974646,975371,975488,975533,975945,976739,976868,977582,977685,978401,978822,979169,979213,979419,979485,979548,979867,979879,980348,980371,981143,981344,982354,982698,983213,983318,983394,983904,984456 CVE References: CVE-2014-9717,CVE-2015-8816,CVE-2015-8845,CVE-2016-0758,CVE-2016-2053,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2188,CVE-2016-2782,CVE-2016-2847,CVE-2016-3134,CVE-2016-3136,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156,CVE-2016-3672,CVE-2016-3689,CVE-2016-3951,CVE-2016-4482,CVE-2016-4486,CVE-2016-4565,CVE-2016-4569,CVE-2016-4578,CVE-2016-4805,CVE-2016-5244 Sources used: SUSE Linux Enterprise Workstation Extension 12 (src): kernel-default-3.12.60-52.49.1 SUSE Linux Enterprise Software Development Kit 12 (src): kernel-docs-3.12.60-52.49.3, kernel-obs-build-3.12.60-52.49.1 SUSE Linux Enterprise Server 12 (src): kernel-default-3.12.60-52.49.1, kernel-source-3.12.60-52.49.1, kernel-syms-3.12.60-52.49.1, kernel-xen-3.12.60-52.49.1 SUSE Linux Enterprise Module for Public Cloud 12 (src): kernel-ec2-3.12.60-52.49.1 SUSE Linux Enterprise Live Patching 12 (src): kgraft-patch-SLE12_Update_14-1-2.1 SUSE Linux Enterprise Desktop 12 (src): kernel-default-3.12.60-52.49.1, kernel-source-3.12.60-52.49.1, kernel-syms-3.12.60-52.49.1, kernel-xen-3.12.60-52.49.1
SUSE-SU-2016:1707-1: An update that solves 17 vulnerabilities and has 25 fixes is now available. Category: security (important) Bug References: 898592,940413,946122,949752,956852,957988,957990,959381,960458,961512,963998,965319,965860,965923,967863,968010,968018,968141,968566,968670,968687,969356,970504,970892,970909,970911,970948,970956,970958,970970,971124,971125,971360,971433,971729,972363,973237,973378,973556,973570,975772,975945 CVE References: CVE-2015-1339,CVE-2015-7566,CVE-2015-8551,CVE-2015-8552,CVE-2015-8816,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2188,CVE-2016-2782,CVE-2016-2847,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156 Sources used: SUSE Linux Enterprise Real Time Extension 11-SP4 (src): kernel-rt-3.0.101.rt130-54.1, kernel-rt_trace-3.0.101.rt130-54.1, kernel-source-rt-3.0.101.rt130-54.1, kernel-syms-rt-3.0.101.rt130-54.1 SUSE Linux Enterprise Debuginfo 11-SP4 (src): kernel-rt-3.0.101.rt130-54.1, kernel-rt_debug-3.0.101.rt130-54.1, kernel-rt_trace-3.0.101.rt130-54.1
SUSE-SU-2016:1764-1: An update that solves 26 vulnerabilities and has 95 fixes is now available. Category: security (important) Bug References: 880007,889207,899908,903279,908151,931448,937086,940413,942262,943645,943989,945219,956084,956852,957986,957988,957990,959146,959514,959709,960174,960561,960629,961500,961512,961658,962336,962872,963193,963572,963746,963765,963827,963960,964201,964461,965087,965153,965199,965319,965830,965924,966054,966094,966437,966471,966573,966693,966831,966864,966910,967047,967251,967292,967299,967650,967651,967802,967903,968010,968018,968074,968141,968206,968230,968234,968253,968448,968497,968512,968643,968670,968687,968812,968813,969112,969439,969571,969655,969690,969735,969992,969993,970062,970160,970504,970604,970609,970892,970909,970911,970948,970955,970956,970958,970970,971124,971125,971126,971159,971170,971360,971600,971628,972003,972068,972174,972780,972844,972891,972951,973378,973556,973855,974406,974418,975371,975488,975772,975945,980246 CVE References: CVE-2015-7566,CVE-2015-8550,CVE-2015-8551,CVE-2015-8552,CVE-2015-8709,CVE-2015-8785,CVE-2015-8812,CVE-2015-8816,CVE-2016-0723,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2188,CVE-2016-2384,CVE-2016-2782,CVE-2016-3134,CVE-2016-3136,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156,CVE-2016-3689,CVE-2016-3707,CVE-2016-3951 Sources used: SUSE Linux Enterprise Real Time Extension 12-SP1 (src): kernel-compute-3.12.58-14.1, kernel-compute_debug-3.12.58-14.1, kernel-rt-3.12.58-14.1, kernel-rt_debug-3.12.58-14.1, kernel-source-rt-3.12.58-14.1, kernel-syms-rt-3.12.58-14.1
SUSE-SU-2016:2074-1: An update that solves 48 vulnerabilities and has 13 fixes is now available. Category: security (important) Bug References: 816446,861093,928130,935757,939826,942367,945825,946117,946309,948562,949744,949936,951440,952384,953527,954404,955354,955654,956708,956709,958463,958886,958951,959190,959399,961500,961509,961512,963765,963767,964201,966437,966460,966662,966693,967972,967973,967974,967975,968010,968011,968012,968013,968670,970504,970892,970909,970911,970948,970956,970958,970970,971124,971125,971126,971360,972510,973570,975945,977847,978822 CVE References: CVE-2013-2015,CVE-2013-7446,CVE-2015-0272,CVE-2015-3339,CVE-2015-5307,CVE-2015-6252,CVE-2015-6937,CVE-2015-7509,CVE-2015-7515,CVE-2015-7550,CVE-2015-7566,CVE-2015-7799,CVE-2015-7872,CVE-2015-7990,CVE-2015-8104,CVE-2015-8215,CVE-2015-8539,CVE-2015-8543,CVE-2015-8569,CVE-2015-8575,CVE-2015-8767,CVE-2015-8785,CVE-2015-8812,CVE-2015-8816,CVE-2016-0723,CVE-2016-2069,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2188,CVE-2016-2384,CVE-2016-2543,CVE-2016-2544,CVE-2016-2545,CVE-2016-2546,CVE-2016-2547,CVE-2016-2548,CVE-2016-2549,CVE-2016-2782,CVE-2016-2847,CVE-2016-3134,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156,CVE-2016-4486 Sources used: SUSE Linux Enterprise Server 11-SP2-LTSS (src): kernel-default-3.0.101-0.7.40.1, kernel-ec2-3.0.101-0.7.40.1, kernel-pae-3.0.101-0.7.40.1, kernel-source-3.0.101-0.7.40.1, kernel-syms-3.0.101-0.7.40.1, kernel-trace-3.0.101-0.7.40.1, kernel-xen-3.0.101-0.7.40.1 SUSE Linux Enterprise Debuginfo 11-SP2 (src): kernel-default-3.0.101-0.7.40.1, kernel-ec2-3.0.101-0.7.40.1, kernel-pae-3.0.101-0.7.40.1, kernel-trace-3.0.101-0.7.40.1, kernel-xen-3.0.101-0.7.40.1
The SLES 11 backport of this patch is broken and will lead to a CPU stall with 31bit applications, see SUSE bug#987099 (LTC bug#143569). This was fixed with patch s390-sles11sp4-13-02-fix-asce_bits-handling.patch from SUSE bug#979915 (LTC bug#141457). The currently released update for SLES 11 SP2 LTSS kernel 3.0.101-0.7.40.1 apparently contains this CVE fix but not the add-on patch 13-02, so this update will probably also show the "CPU stall" issue.
openSUSE-SU-2016:2649-1: An update that solves 49 vulnerabilities and has 17 fixes is now available. Category: security (important) Bug References: 1004418,758540,816446,861093,917648,928130,935757,939826,942367,944296,945825,946117,946309,948562,949744,949936,951440,952384,953527,954404,955354,955654,956708,956709,958463,958886,958951,959190,959399,961500,961509,961512,963765,963767,964201,966437,966460,966662,966693,967972,967973,967974,967975,968010,968011,968012,968013,968670,969356,970504,970892,970909,970911,970948,970956,970958,970970,971124,971125,971126,971360,972510,973570,975945,977847,978822 CVE References: CVE-2013-7446,CVE-2015-0272,CVE-2015-1339,CVE-2015-3339,CVE-2015-5307,CVE-2015-6252,CVE-2015-6937,CVE-2015-7509,CVE-2015-7515,CVE-2015-7550,CVE-2015-7566,CVE-2015-7799,CVE-2015-7872,CVE-2015-7990,CVE-2015-8104,CVE-2015-8215,CVE-2015-8539,CVE-2015-8543,CVE-2015-8569,CVE-2015-8575,CVE-2015-8767,CVE-2015-8785,CVE-2015-8812,CVE-2015-8816,CVE-2016-0723,CVE-2016-2069,CVE-2016-2143,CVE-2016-2184,CVE-2016-2185,CVE-2016-2186,CVE-2016-2188,CVE-2016-2384,CVE-2016-2543,CVE-2016-2544,CVE-2016-2545,CVE-2016-2546,CVE-2016-2547,CVE-2016-2548,CVE-2016-2549,CVE-2016-2782,CVE-2016-2847,CVE-2016-3134,CVE-2016-3137,CVE-2016-3138,CVE-2016-3139,CVE-2016-3140,CVE-2016-3156,CVE-2016-4486,CVE-2016-5195 Sources used: openSUSE Evergreen 11.4 (src): kernel-debug-3.0.101-105.1, kernel-default-3.0.101-105.1, kernel-desktop-3.0.101-105.1, kernel-docs-3.0.101-105.2, kernel-ec2-3.0.101-105.1, kernel-pae-3.0.101-105.1, kernel-source-3.0.101-105.1, kernel-syms-3.0.101-105.1, kernel-trace-3.0.101-105.1, kernel-vanilla-3.0.101-105.1, kernel-vmi-3.0.101-105.1, kernel-xen-3.0.101-105.1, preload-1.2-6.83.1