Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Meltdown/Spectre: Unauthorized Disclosure of Kernel Memory

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Locked
Advanced search
562 posts
  • Page 14 of 23
    • Jump to page:
  • Previous
  • 1
  • …
  • 12
  • 13
  • 14
  • 15
  • 16
  • …
  • 23
  • Next
Author
Message
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

Post by eccerr0r » Sun Jan 14, 2018 12:54 am

Indeed, doesn't matter if you're running 64 bit amd64 or 32 bit x86, both are affected.

There's a workaround for 64-bit amd64 for Intel CPUs problem with meltdown, but none for 32-bit at the moment, which is what the commotion is about.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
mno
Guru
Guru
User avatar
Posts: 454
Joined: Mon Dec 29, 2003 5:29 am
Location: Toronto, Canada

Post by mno » Sun Jan 14, 2018 12:56 am

eccerr0r wrote:There's a workaround for 64-bit amd64 for Intel CPUs problem with meltdown, but none for 32-bit at the moment, which is what the commotion is about.
Thank you, if you can quickly dig this up, can you point me to the workaround?
"Hello and goodbye. As always." | You can't use   here?? | Unanswered
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

Post by eccerr0r » Sun Jan 14, 2018 12:59 am

I guess this should be stickied somewhere but oh well, not a problem to keep posting it...
https://wiki.gentoo.org/wiki/Project:Se ... nd_Spectre (oh wait, it's on the first post!)
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
mno
Guru
Guru
User avatar
Posts: 454
Joined: Mon Dec 29, 2003 5:29 am
Location: Toronto, Canada

Post by mno » Sun Jan 14, 2018 1:01 am

Thank you! I did find that link going through this post, I wasn't sure if that's what you referred to by workaround for amd64 Intel. Thanks again!
"Hello and goodbye. As always." | You can't use   here?? | Unanswered
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

Post by Hu » Sun Jan 14, 2018 1:06 am

eccerr0r wrote:I guess this should be stickied somewhere but oh well, not a problem to keep posting it...
https://wiki.gentoo.org/wiki/Project:Se ... nd_Spectre (oh wait, it's on the first post!)
Several days ago, pjp put it in the first post of the thread. Does that count? :)
Top
gengreen
Apprentice
Apprentice
Posts: 150
Joined: Sat Dec 23, 2017 2:49 am
Contact:
Contact gengreen
Website

Post by gengreen » Sun Jan 14, 2018 1:08 am

I don't know how reliable is it, but I found it pratical to be informed about the meltdown/spectre security for my system :

https://github.com/speed47/spectre-meltdown-checker

The script note :
IMPORTANT:
A false sense of security is worse than no security at all.
Loved it.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

Post by eccerr0r » Sun Jan 14, 2018 1:44 am

Hu wrote:Several days ago, pjp put it in the first post of the thread. Does that count? :)
I'm just glad someone finally fixed the title correctly so that this bug didn't imply a denial of service vector versus a memory disclosure issue :p
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
PrSo
Tux's lil' helper
Tux's lil' helper
Posts: 136
Joined: Thu Jun 01, 2017 1:02 pm

Post by PrSo » Sun Jan 14, 2018 4:05 pm

pjp wrote: That sounds to me like CONFIG_PAGE_TABLE_ISOLATION should be enabled for AMD processors. Or at least not setting it with the knowledge of leaving the vulnerability exposed.
It does not matter if C_P_T_I is set YES or disabled.

Yesterday I have made some tests. I have compiled kernel with CONFIG_PAGE_TABLE_ISOLATION=YES but I havent observed anything in performance change. There is nothing about PTI in dmesg output. I have started to dig deeper:

From manual
Documentation/x86/pti.txt wrote:It can be enabled by setting CONFIG_PAGE_TABLE_ISOLATION=y
the default PTI state during boot is set to "auto", and in

Code: Select all

arch/x86/mm/ptic.c
there is a function:

Code: Select all

 autosel:
	if (!boot_cpu_has_bug(X86_BUG_CPU_MELTDOWN))
		return;
enable:
	setup_force_cpu_cap(X86_FEATURE_PTI);
}
With Thomas amendment AMD cpu's are exemplified from having X86_BUG_CPU_MELTDOWN flag on (previously was X86_BUG_CPU_INSECURE).

So it seems that even if you compile kernel with CONFIG_PAGE_TABLE_ISOLATION=Y PTI is auto-disabled on AMD cpu anyway.
Top
dmpogo
Advocate
Advocate
Posts: 3711
Joined: Thu Sep 02, 2004 9:21 pm
Location: Canada

Post by dmpogo » Sun Jan 14, 2018 8:00 pm

In view of retpoline that supposedly has less performance hit than microcode update, does it mean that one actually does NOT want to do microcode update for Spectra v2 mitigation ?
Top
noci2
n00b
n00b
Posts: 11
Joined: Sun Jan 14, 2018 6:16 pm

Post by noci2 » Sun Jan 14, 2018 9:05 pm

Ant P. wrote:
PrSo wrote:This is another 3 in 1 meltdown-spectre mitigation checker:

CVE-2017-5753 [bounds check bypass] aka 'Spectre Variant 1'
* Kernel compiled with LFENCE opcode inserted at the proper places: NO (only 23 opcodes found, should be >= 70)
> STATUS: VULNERABLE [/code]
I wonder if that's a side effect of Gentoo kernels not compiling in thousands of useless drivers. Maybe we're fine there.
Same here:
--8<--
Will use vmlinux image /usr/src/linux/vmlinux
Will use kconfig /usr/src/linux/.config
Will use System.map file /boot/System.map-genkernel-x86_64-4.14.12-gentoo

CVE-2017-5753 [bounds check bypass] aka 'Spectre Variant 1'
* Checking count of LFENCE opcodes in kernel: NO
> STATUS: VULNERABLE (only 13 opcodes found, should be >= 70, heuristic to be improved when official patches become available)

CVE-2017-5715 [branch target injection] aka 'Spectre Variant 2'
* Mitigation 1
--8<--
Top
blopsalot
Apprentice
Apprentice
Posts: 231
Joined: Sat Jan 28, 2017 8:04 am

Post by blopsalot » Sun Jan 14, 2018 9:13 pm

gengreen wrote:I don't know how reliable is it, but I found it pratical to be informed about the meltdown/spectre security for my system :

https://github.com/speed47/spectre-meltdown-checker

The script note :
IMPORTANT:
A false sense of security is worse than no security at all.
Loved it.
A shell script checking kernel config is exactly that, a false sense of security. This project is the only PoC/test I found that's not garbage.
https://github.com/IAIK/meltdown
Top
Naib
Watchman
Watchman
User avatar
Posts: 6101
Joined: Fri May 21, 2004 9:42 pm
Location: Removed by Neddy
Contact:
Contact Naib
Website

Post by Naib » Sun Jan 14, 2018 10:07 pm

blopsalot wrote:
gengreen wrote:I don't know how reliable is it, but I found it pratical to be informed about the meltdown/spectre security for my system :

https://github.com/speed47/spectre-meltdown-checker

The script note :
IMPORTANT:
A false sense of security is worse than no security at all.
Loved it.
A shell script checking kernel config is exactly that, a false sense of security. This project is the only PoC/test I found that's not garbage.
https://github.com/IAIK/meltdown
Exactly...

Part of me groaned when that "checker" was being used around this place... it just checks the main mitigations are in-place. This in itself is a good check BUT if you really want to be sure you need to run the PoC code
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Top
PrSo
Tux's lil' helper
Tux's lil' helper
Posts: 136
Joined: Thu Jun 01, 2017 1:02 pm

Post by PrSo » Sun Jan 14, 2018 10:51 pm

Naib wrote:Exactly...

Part of me groaned when that "checker" was being used around this place... it just checks the main mitigations are in-place. This in itself is a good check BUT if you really want to be sure you need to run the PoC code
100% agreed with that.
I have posted this only for reason to check if you have all AVAILIBLE mitigation applied in your kernel that are currently publicized (that are available in kernels provided by gentoo).

Same states the Disclamer.

To be sure that you are protected you have to test your system with proper PoC . There are many PoC's that doesnt work, or are giving false-positive. i.e.:
blopsalot wrote:https://github.com/IAIK/meltdown
gives me false-positive.

If that would be true the author of this script should get contacted with AMD or make a public statement about AMD's vulnerability to Meltdown (if this program test Meltdown case of course tough).

Post Sciptum:
I am not the author of this checker.
Top
mike155
Advocate
Advocate
Posts: 4438
Joined: Fri Sep 17, 2010 11:33 pm
Location: Frankfurt, Germany

Post by mike155 » Sun Jan 14, 2018 11:02 pm

Part of me groaned when that "checker" was being used around this place
A shell script checking kernel config is exactly that, a false sense of security.
I like this checker script - and I'm glad it exists! Of course, it cannot prove that your computer is secure. But it can show which patches have been installed and what's left to be done. What's wrong with that?
Top
blopsalot
Apprentice
Apprentice
Posts: 231
Joined: Sat Jan 28, 2017 8:04 am

Post by blopsalot » Sun Jan 14, 2018 11:10 pm

PrSo wrote:
Naib wrote:Exactly...

Part of me groaned when that "checker" was being used around this place... it just checks the main mitigations are in-place. This in itself is a good check BUT if you really want to be sure you need to run the PoC code
100% agreed with that.
I have posted this only for reason to check if you have all AVAILIBLE mitigation applied in your kernel that are currently publicized (that are available in kernels provided by gentoo).

Same states the Disclamer.

To be sure that you are protected you have to test your system with proper PoC . There are many PoC's that doesnt work, or are giving false-positive. i.e.:
blopsalot wrote:https://github.com/IAIK/meltdown
gives me false-positive.

If that would be true the author of this script should get contacted with AMD or make a public statement about AMD's vulnerability to Meltdown (if this program test Meltdown case of course tough).

Post Sciptum:
I am not the author of this checker.
I've tested it thoroughly. It's working code. You are just used to the false-negatives at this point.

edit: I guess I'll add, that it does not do it for you. running ./test is not verification.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

Post by eccerr0r » Sun Jan 14, 2018 11:53 pm

Will definitely emphasize one of the spectre PoC code will remain test positive even with all the patches applied (unless you recompile with a patched gcc, which then would end up being a false negative.) That spectre PoC is only good for demonstrating the CPU has the issue, but does not prove your computer is secure or not.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

Post by figueroa » Mon Jan 15, 2018 12:26 am

I updated my kernel to the 4.9.76-gentoo ~amd64 and don't think I can do more. There doesn't appear to be fixed microcode yet for my Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (Intel calls it "Products formerly Sandy Bridge" from 5-6 years ago).

Good news is that the kernel seems to run just fine.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
PrSo
Tux's lil' helper
Tux's lil' helper
Posts: 136
Joined: Thu Jun 01, 2017 1:02 pm

Post by PrSo » Mon Jan 15, 2018 12:47 am

blopsalot wrote: I've tested it thoroughly. It's working code. You are just used to the false-negatives at this point.

edit: I guess I'll add, that it does not do it for you. running ./test is not verification.
Maybe not exact false-positive.
I have repeated the test, but after executing

Code: Select all

sudo taskset 0x1 ./kaslr
it took about 20 minutes to guess the address. (one cpu core was 100% utilized),
and then

Code: Select all

sudo taskset 0x1 ./reliability ....
is running now almost an hour or so. These are not couple of seconds mentioned on the web page.
This machine has an old apu a6 6310.
Top
blopsalot
Apprentice
Apprentice
Posts: 231
Joined: Sat Jan 28, 2017 8:04 am

Post by blopsalot » Mon Jan 15, 2018 12:55 am

when you are using a race condition to launch a microarchitectural attack there will be some inconsistency. ;)
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

Post by The Main Man » Mon Jan 15, 2018 1:46 am

PoC that needs root privileges to work, I don't get that :?
Top
blopsalot
Apprentice
Apprentice
Posts: 231
Joined: Sat Jan 28, 2017 8:04 am

Post by blopsalot » Mon Jan 15, 2018 1:47 am

kajzer wrote:PoC that needs root privileges to work, I don't get that :?
u can't just give it away to the scriptkidz
Top
The Main Man
Veteran
Veteran
Posts: 1173
Joined: Thu Nov 27, 2014 11:25 pm
Location: /run/user/1000

Post by The Main Man » Mon Jan 15, 2018 2:13 am

blopsalot wrote:
kajzer wrote:PoC that needs root privileges to work, I don't get that :?
u can't just give it away to the scriptkidz
But there already are PoC's that work without root access, I can only imagine what is out there in the wild, so I'm pretty sure they can get that easily.
But to write a PoC and need that.... maybe I got things wrong but I thought the whole point of this exploits/bugs is that you can read kernel memory from userland, reading it from root ... I don't see a point.
Top
blopsalot
Apprentice
Apprentice
Posts: 231
Joined: Sat Jan 28, 2017 8:04 am

Post by blopsalot » Mon Jan 15, 2018 2:21 am

kajzer wrote:
blopsalot wrote:
kajzer wrote:PoC that needs root privileges to work, I don't get that :?
u can't just give it away to the scriptkidz
But there already are PoC's that work without root access, I can only imagine what is out there in the wild, so I'm pretty sure they can get that easily.
But to write a PoC and need that.... maybe I got things wrong but I thought the whole point of this exploits/bugs is that you can read kernel memory from userland, reading it from root ... I don't see a point.
had u actually read the documentation, it is explained. they chose not to include a mechanism to defeat KASLR without root. physical_reader and memdump run from userspace.
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

Post by pjp » Mon Jan 15, 2018 4:41 am

PrSo wrote:
pjp wrote: That sounds to me like CONFIG_PAGE_TABLE_ISOLATION should be enabled for AMD processors. Or at least not setting it with the knowledge of leaving the vulnerability exposed.
So it seems that even if you compile kernel with CONFIG_PAGE_TABLE_ISOLATION=Y PTI is auto-disabled on AMD cpu anyway.
But the underlying issue is still whether or not AMD should have it enabled. From the prior information, the answer appears to be yes.

To enable the functionality, I had to enable the kernel option AND enable it on the kernel command line with "pti=on". After that (and only after that):

Code: Select all

 dmesg |grep -i isol
[    0.000000] Kernel/User page tables isolation: force enabled on command line.
[    0.000000] Kernel/User page tables isolation: enabled
(I got the idea from Naib's post on page 5 of this thread which referenced "pti=off". Thanks Naib!)
Quis separabit? Quo animo?
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

Post by pjp » Mon Jan 15, 2018 5:00 am

Naib wrote:
blopsalot wrote:This project is the only PoC/test I found that's not garbage.
https://github.com/IAIK/meltdown
Exactly...

Part of me groaned when that "checker" was being used around this place... it just checks the main mitigations are in-place. This in itself is a good check BUT if you really want to be sure you need to run the PoC code
What makes random C code on github which requires root access trustworthy?
kajzer wrote:But to write a PoC and need that.... maybe I got things wrong but I thought the whole point of this exploits/bugs is that you can read kernel memory from userland, reading it from root ... I don't see a point.
Well, isn't one of the primary warnings to not run untrustworthy code?
Quis separabit? Quo animo?
Top
Locked

562 posts
  • Page 14 of 23
    • Jump to page:
  • Previous
  • 1
  • …
  • 12
  • 13
  • 14
  • 15
  • 16
  • …
  • 23
  • Next

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic