Skip to contentSkip to conversation

ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c

DISCUSSION Mark Salyzyn 3 participants 6 messages May 9, 2018 – May 15, 2018 Stable branch

lore
Share & tools
lore
#0 lore raw

ToT commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c

(ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c)

was assigned CVE-2017-13695 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13695
and has been public since August 25 2017

Please apply to 3.18, 4.4 and 4.9 stable kernels for the reasons outlined in the body of the patch:

"This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR."

Bonus Points: Since the patch is ToT upstream, relieving the bug that results in the memory leak, even despite the non-CVE security status for <=4.12 kernels, it may be advised to also include this patch in 4.14.y stable as well.

Sincerely -- Mark Salyzyn

maintainer
#1 lore raw
Quoted 1 line · Mark Salyzyn

ToT commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c

"ToT"? What does that mean?

Quoted 10 lines

(ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c)

was assigned CVE-2017-13695
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13695
and has been public since August 25 2017

Please apply to 3.18, 4.4 and 4.9 stable kernels for the reasons outlined in the body of the patch:

Quoted 8 lines

"This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR."

Bonus Points: Since the patch is ToT upstream, relieving the bug that results in the memory leak, even despite the non-CVE security status for <=4.12 kernels, it may be advised to also include this patch in 4.14.y stable as well.

Well, I wouldn't apply a patch to just older kernels and not newer ones, that just causes confusion.

But I'm going to push back on this. The kernel security team said something like "this is crazy, if you control ACPI tables you have bigger problems" when this bug was reported and told the developer to just submit this as a normal code cleanup.

Granting this a CVE was, in my opinion, a total mistake as well. This doesn't fix any "real" problem that anyone can hit in the wild from what I can tell. And again, if you can modify ACPI tables, there are much bigger problems you can cause on the hardware.

Because of this, why would you need/want this in the stable kernel releases? It doesn't fix any real bug, only a theoretical one, right?

ACPI developers, do you think this should be backported?

thanks,

greg k-h

#2 lore raw
Quoted 43 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, May 9, 2018 11:55 PM
To: Mark Salyzyn <[email protected]>
Cc: stable <[email protected]>; Seunghun Han <[email protected]>; Schmauss, Erik <[email protected]>; Wysocki, Rafael J <[email protected]>; kernel-team <[email protected]>
Subject: Re: ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c

Quoted 1 line · Mark Salyzyn

ToT commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c

"ToT"? What does that mean?

Quoted 14 lines

(ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c)

was assigned CVE-2017-13695
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13695
and has been public since August 25 2017

Please apply to 3.18, 4.4 and 4.9 stable kernels for the reasons outlined in the body of the patch:

"This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR."

Quoted 5 lines

Bonus Points: Since the patch is ToT upstream, relieving the bug that results in the memory leak, even despite the non-CVE security status for
<=4.12 kernels, it may be advised to also include this patch in 4.14.y stable as well.

Well, I wouldn't apply a patch to just older kernels and not newer ones, that just causes confusion.

But I'm going to push back on this. The kernel security team said something like "this is crazy, if you control ACPI tables you have bigger problems" when this bug was reported and told the developer to just submit this as a normal code cleanup.

Quoted 4 lines

Granting this a CVE was, in my opinion, a total mistake as well. This doesn't fix any "real" problem that anyone can hit in the wild from what I can tell. And again, if you can modify ACPI tables, there are much bigger problems you can cause on the hardware.

Agreed. Could we somehow close this CVE?

Quoted 3 lines

Because of this, why would you need/want this in the stable kernel releases? It doesn't fix any real bug, only a theoretical one, right?

The AML would need to be carefully crafted. So yes, this could happen in theory.

Quoted 2 lines

ACPI developers, do you think this should be backported?

One reason to backport this patch is that it performs memory reclamation for certain code paths. So no, not necessary but it might be a nice-to-have.

Erik

Quoted 4 lines

thanks,

greg k-h

maintainer
#3 lore raw
Quoted 43 lines · Erik
Quoted 43 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, May 9, 2018 11:55 PM
To: Mark Salyzyn <[email protected]>
Cc: stable <[email protected]>; Seunghun Han <[email protected]>; Schmauss, Erik <[email protected]>; Wysocki, Rafael J <[email protected]>; kernel-team <[email protected]>
Subject: Re: ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c

Quoted 1 line · Mark Salyzyn

ToT commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c

"ToT"? What does that mean?

Quoted 14 lines

(ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c)

was assigned CVE-2017-13695
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13695
and has been public since August 25 2017

Please apply to 3.18, 4.4 and 4.9 stable kernels for the reasons outlined in the body of the patch:

"This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR."

Quoted 5 lines

Bonus Points: Since the patch is ToT upstream, relieving the bug that results in the memory leak, even despite the non-CVE security status for
<=4.12 kernels, it may be advised to also include this patch in 4.14.y stable as well.

Well, I wouldn't apply a patch to just older kernels and not newer ones, that just causes confusion.

But I'm going to push back on this. The kernel security team said something like "this is crazy, if you control ACPI tables you have bigger problems" when this bug was reported and told the developer to just submit this as a normal code cleanup.

Quoted 6 lines
Quoted 4 lines

Granting this a CVE was, in my opinion, a total mistake as well. This doesn't fix any "real" problem that anyone can hit in the wild from what I can tell. And again, if you can modify ACPI tables, there are much bigger problems you can cause on the hardware.

Agreed. Could we somehow close this CVE?

Please do, you can submit a request for it to be rejected on the main CVE site somewhere. I've done it once in the past.

Quoted 10 lines
Quoted 2 lines

Because of this, why would you need/want this in the stable kernel releases? It doesn't fix any real bug, only a theoretical one, right?

The AML would need to be carefully crafted. So yes, this could happen in theory.

Quoted 2 lines

ACPI developers, do you think this should be backported?

One reason to backport this patch is that it performs memory reclamation for certain code paths. So no, not necessary but it might be a nice-to-have.

Nice to have for what? If the AML is correct (as all devices have), all should be fine, right?

thanks,

greg k-h

#4 lore raw
Quoted 64 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Thursday, May 10, 2018 10:24 PM
To: Schmauss, Erik <[email protected]>
Cc: Mark Salyzyn <[email protected]>; Moore, Robert <[email protected]>; stable <[email protected]>; Seunghun Han <[email protected]>; Wysocki, Rafael J <[email protected]>; kernel-team <[email protected]>
Subject: Re: ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c

Quoted 51 lines · Erik
Quoted 50 lines

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, May 9, 2018 11:55 PM
To: Mark Salyzyn <[email protected]>
Cc: stable <[email protected]>; Seunghun Han <[email protected]>; Schmauss, Erik <[email protected]>; Wysocki, Rafael J <[email protected]>; kernel-team <[email protected]>
Subject: Re: ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c

Quoted 1 line · Mark Salyzyn

ToT commit 97f3c0a4b0579b646b6b10ae5a3d59f0441cc12c

"ToT"? What does that mean?

Quoted 15 lines

(ACPICA: acpi: acpica: fix acpi operand cache leak in nseval.c)

was assigned CVE-2017-13695
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-13695
and has been public since August 25 2017

Please apply to 3.18, 4.4 and 4.9 stable kernels for the reasons outlined in the body of the patch:

"This cache leak causes a security threat because an old kernel (<=
4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR."

Quoted 5 lines

Bonus Points: Since the patch is ToT upstream, relieving the bug that results in the memory leak, even despite the non-CVE security status for
<=4.12 kernels, it may be advised to also include this patch in 4.14.y stable as well.

Well, I wouldn't apply a patch to just older kernels and not newer ones, that just causes confusion.

But I'm going to push back on this. The kernel security team said something like "this is crazy, if you control ACPI tables you have bigger problems" when this bug was reported and told the developer to just submit this as a normal code cleanup.

Granting this a CVE was, in my opinion, a total mistake as well. This doesn't fix any "real" problem that anyone can hit in the wild from what I can tell. And again, if you can modify ACPI tables, there are much bigger problems you can cause on the hardware.

Quoted 4 lines
Quoted 1 line

Agreed. Could we somehow close this CVE?

Please do, you can submit a request for it to be rejected on the main CVE site somewhere. I've done it once in the past.

Ok. I'll do this.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Because of this, why would you need/want this in the stable kernel releases? It doesn't fix any real bug, only a theoretical one, right?

The AML would need to be carefully crafted. So yes, this could happen in

theory.

Quoted 2 lines
Quoted 2 lines
Quoted 8 lines
Quoted 4 lines
Quoted 1 line

ACPI developers, do you think this should be backported?

One reason to backport this patch is that it performs memory reclamation for certain code paths. So no, not necessary but it might be a

nice-to-have.

Nice to have for what? If the AML is correct (as all devices have), all should be fine, right?

If the AML is correct, it's fine. Almost all OEMs use ASL compilers like iASL to ensure correctness of ASL/AML.

This patch might be nice to have for when users wish to alter their ACPI tables by hand and those altered ACPI tables cause this memory leak. If you wish to account for memory leaks that result from these hand-crafted AML files, then you should add this patch. Otherwise, it's not necessary.

Erik

Quoted 4 lines

thanks,

greg k-h

#5 lore raw
Quoted 5 lines · Erik
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

But I'm going to push back on this. The kernel security team said something like "this is crazy, if you control ACPI tables you have bigger problems" when this bug was reported and told the developer to just submit this as a normal code cleanup.

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
Quoted 4 lines

Granting this a CVE was, in my opinion, a total mistake as well. This doesn't fix any "real" problem that anyone can hit in the wild from what I can tell. And again, if you can modify ACPI tables, there are much bigger problems you can cause on the hardware.

Agreed. Could we somehow close this CVE?

Please do, you can submit a request for it to be rejected on the main CVE site somewhere. I've done it once in the past.

Ok. I'll do this.

Thanks!

Please do the same for CVE-2017-13694 (not in Linus' tree) as well as this one CVE-2017-13695 (in Linus' tree) as they are both associated with crafted ACPI tables.

I am rescinding my request to have these in stable for security concerns.

Quoted 2 lines

If the AML is correct, it's fine. Almost all OEMs use ASL compilers like iASL to ensure correctness of ASL/AML.

That probably is enough to push back on stable, really an academic defence in depth measure.

Quoted 5 lines

This patch might be nice to have for when users wish to alter their ACPI tables by hand and those altered ACPI tables cause this memory leak. If you wish to account for memory leaks that result from these hand-crafted AML files, then you should add this patch. Otherwise, it's not necessary.

Linus' tree has this, should deal with those advanced developers/users that wish to alter their ACPI tables by hand? The leak is probably a smaller issue than what can happen if someone decides to adjust them by hand ;-}

-- Mark