Skip to contentSkip to conversation

Error applying XSA240 update 5 on 4.8 and 4.9 (patch 3 references CONFIG_PV_LINEAR_PT, 3285e75dea89, x86/mm: Make PV linear pagetables optional)

BUG John Thomson 5 participants 7 messages Nov 15, 2017 – Nov 16, 2017

lore
Share & tools
lore
#0 lore raw

Hi,

I am having trouble applying the patch 3 from XSA240 update 5 for xen stable 4.8 and 4.9
xsa240 0003 contains:

CONFIG_PV_LINEAR_PT

from:

x86/mm: Make PV linear pagetables optional
https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=3285e75dea89afb0ef5b3ee39bd15194bd7cc110

I cannot find this string in an XSA, nor is an XSA referenced in the commit.
Am I missing a patch, or doing something wrong?

xsa240-4.9 0002 and 3285e75dea "x86/mm: Make PV linear pagetables optional" conflict as is.
xsa240-4.9 0003 applies after 3285e75dea "x86/mm: Make PV linear pagetables optional"

Could we also refer to the third patch in the XSA resolution section please?

Thank you,
--
John Thomson

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#1 lore raw
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 15.11.17 at 23:48, <[email protected]> wrote:

Hi,

I am having trouble applying the patch 3 from XSA240 update 5 for xen stable 4.8 and 4.9
xsa240 0003 contains:

CONFIG_PV_LINEAR_PT

from:

Quoted 7 lines

x86/mm: Make PV linear pagetables optional
https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=3285e75dea89afb0ef5
b3ee39bd15194bd7cc110

I cannot find this string in an XSA, nor is an XSA referenced in the commit.
Am I missing a patch, or doing something wrong?

Well, you're expected to apply all patched which haven't been applied so far. In particular, in the stable version trees, the 2nd patch hasn't gone in yet (I'm intending to do this later today), largely because it (a) wasn't ready at the time the first patch went in and (b) it is more a courtesy patch than an actual part of the security fix.

Quoted 2 lines

xsa240-4.9 0002 and 3285e75dea "x86/mm: Make PV linear pagetables optional" conflict as is.

Oh, that's rather unfortunate. The patch (all versions, including the master one) is stale. A proper backport of 3285e75dea ("x86/mm: Make PV linear pagetables optional") is needed instead. Please see the backports I'm intending to commit later today.

Quoted 5 lines

xsa240-4.9 0003 applies after 3285e75dea "x86/mm: Make PV linear pagetables optional"

Could we also refer to the third patch in the XSA resolution section please?

Hmm, I see the text doesn't mention that new patch; the list of patches (with their sha256 sums) includes it though, which I think is good enough.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
Quoted 19 lines · AEDT Jan Beulich
Quoted 11 lines
Quoted 1 line
Quoted 1 line · On 15.11.17 at 23:48, <[email protected]> wrote:

Hi,

I am having trouble applying the patch 3 from XSA240 update 5 for xen stable 4.8 and 4.9
xsa240 0003 contains:

CONFIG_PV_LINEAR_PT

from:

Quoted 7 lines

x86/mm: Make PV linear pagetables optional
https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=3285e75dea89afb0e
f5 b3ee39bd15194bd7cc110

I cannot find this string in an XSA, nor is an XSA referenced in the commit.
Am I missing a patch, or doing something wrong?

Quoted 6 lines

Well, you're expected to apply all patched which haven't been applied so far. In particular, in the stable version trees, the 2nd patch hasn't gone in yet (I'm intending to do this later today), largely because it (a) wasn't ready at the time the first patch went in and (b) it is more a courtesy patch than an actual part of the security fix.

I'm not quite sure this is a great idea... They should work on the released versions - hence xsa240 patchset should apply to the base tarball + current XSA patches. If there is something in the git that *isn't* in the latest release, it should be included in the XSA patchset - otherwise the set is incomplete.

I don't see mention of anywhere in the written XSA that mentions a separate patch is required outside of the patches included with the XSA.

Could I suggest that we re-do v6 of these patches with the complete required set?

These should be included in 4.9.1 - which makes most things irrelevant - but I'm not aware of what the release window is for 4.9.1.

Signature · 4 lines
Steven Haigh

📧 [email protected]       💻 http://www.crc.id.au
📞 +61 (3) 9001 6090    📱 0412 935 897

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 26 lines
Quoted 1 line
Quoted 1 line · On 16.11.17 at 13:30, <[email protected]> wrote:
Quoted 17 lines · AEDT Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 15.11.17 at 23:48, <[email protected]> wrote:

I am having trouble applying the patch 3 from XSA240 update 5 for xen stable 4.8 and 4.9
xsa240 0003 contains:

CONFIG_PV_LINEAR_PT

from:

Quoted 7 lines

x86/mm: Make PV linear pagetables optional
https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=3285e75dea89afb0e
f5 b3ee39bd15194bd7cc110

I cannot find this string in an XSA, nor is an XSA referenced in the commit.
Am I missing a patch, or doing something wrong?

Quoted 6 lines

Well, you're expected to apply all patched which haven't been applied so far. In particular, in the stable version trees, the 2nd patch hasn't gone in yet (I'm intending to do this later today), largely because it (a) wasn't ready at the time the first patch went in and (b) it is more a courtesy patch than an actual part of the security fix.

Quoted 5 lines

I'm not quite sure this is a great idea... They should work on the released versions - hence xsa240 patchset should apply to the base tarball + current XSA patches. If there is something in the git that *isn't* in the latest release, it should be included in the XSA patchset - otherwise the set is incomplete.

Well, I've been taking a different view: The only valid (or so to say canonical) base to supply patches against is the current tip of the respective staging branch. Anyone wanting to apply to anything older will need to make adjustments, if need be. Otherwise what would keep you or others to request, say, not only patches against 4.7.3, but also against 4.7.0, 4.7.1, and 4.7.2?

Quoted 2 lines

I don't see mention of anywhere in the written XSA that mentions a separate patch is required outside of the patches included with the XSA.

It isn't (afaict), it's just that the included patch 2 is stale. This is certainly unfortunate, but correct patches can now easily be taken from the respective git branches. I'm not convinced it is worthwhile to re-issue the advisory yet another time, but I'm also not going to stand in the way if others on the security team want to do so.

Quoted 2 lines

These should be included in 4.9.1 - which makes most things irrelevant - but I'm not aware of what the release window is for 4.9.1.

It is in preparation; I was merely waiting for these regression fixes to be publicly announced.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 32 lines · Jan Beulich
Quoted 26 lines
Quoted 1 line
Quoted 1 line · On 16.11.17 at 13:30, <[email protected]> wrote:
Quoted 17 lines · AEDT Jan Beulich
Quoted 9 lines
Quoted 1 line
Quoted 1 line · On 15.11.17 at 23:48, <[email protected]> wrote:

I am having trouble applying the patch 3 from XSA240 update 5 for xen stable 4.8 and 4.9
xsa240 0003 contains:

CONFIG_PV_LINEAR_PT

from:

Quoted 7 lines

x86/mm: Make PV linear pagetables optional
https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=3285e75dea89afb0e
f5 b3ee39bd15194bd7cc110

I cannot find this string in an XSA, nor is an XSA referenced in the commit.
Am I missing a patch, or doing something wrong?

Quoted 6 lines

Well, you're expected to apply all patched which haven't been applied so far. In particular, in the stable version trees, the 2nd patch hasn't gone in yet (I'm intending to do this later today), largely because it (a) wasn't ready at the time the first patch went in and (b) it is more a courtesy patch than an actual part of the security fix.

Quoted 5 lines

I'm not quite sure this is a great idea... They should work on the released versions - hence xsa240 patchset should apply to the base tarball + current XSA patches. If there is something in the git that *isn't* in the latest release, it should be included in the XSA patchset - otherwise the set is incomplete.

Quoted 6 lines

Well, I've been taking a different view: The only valid (or so to say canonical) base to supply patches against is the current tip of the respective staging branch. Anyone wanting to apply to anything older will need to make adjustments, if need be. Otherwise what would keep you or others to request, say, not only patches against 4.7.3, but also against 4.7.0, 4.7.1, and 4.7.2?

Jan,

These are two different things. Steve's reluctance to backport a potentially arbitrary number of non-security-related patches is completely reasonable.

Steve, one of the problems with what you ask is that as a security team, we'd like to be able to take the patches given in the advisory and check it in, as-is, to the staging branches. That makes it easier, for instance, to make sure that all the XSAs have been applied before we do a release; and it means that we only need to review one patch per supported release (up to 5 potential patches at this time in addition to the one to xen-unstable) rather than two (up to 10 potential patches).

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw

George Dunlap writes ("Re: [BUG] Error applying XSA240 update 5 on 4.8 and 4.9 (patch 3 references CONFIG_PV_LINEAR_PT, 3285e75dea89, x86/mm: Make PV linear pagetables optional)"):

Quoted 3 lines

These are two different things. Steve's reluctance to backport a potentially arbitrary number of non-security-related patches is completely reasonable.

I think the right thing to do is this:

If the patche(s) in an XSA require commits from staging-N which are not contained in previous XSAs, the prerequisite commits should be listed in the advisory.

That way someone who is following the XSAs (and by implication does not want to take the other stuff from staging-N/stable-N or even our point releases) will be able to take the minimum set necessary.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#6 lore raw
Quoted 1 line · AEDT Ian Jackson

George Dunlap writes ("Re: [BUG] Error applying XSA240 update 5 on 4.8 and

4.9 (patch 3 references CONFIG_PV_LINEAR_PT, 3285e75dea89, x86/mm: Make PV linear pagetables optional)"):

Quoted 6 lines
Quoted 3 lines

These are two different things. Steve's reluctance to backport a potentially arbitrary number of non-security-related patches is completely reasonable.

I think the right thing to do is this:

Quoted 7 lines

If the patche(s) in an XSA require commits from staging-N which are not contained in previous XSAs, the prerequisite commits should be listed in the advisory.

That way someone who is following the XSAs (and by implication does not want to take the other stuff from staging-N/stable-N or even our point releases) will be able to take the minimum set necessary.

Hi Ian,

I think that would be a great idea. That way, if a non-xsa and non-release commit is required, at least it is documented as such - therefore correctable.

On a theoretical side though, what would be the chances of opening up other vulnerabilities like this? I would think somewhat minimal, but worthy of thought - even in passing...

Signature · 4 lines
Steven Haigh

📧 [email protected]       💻 http://www.crc.id.au
📞 +61 (3) 9001 6090    📱 0412 935 897

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel