Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Full Disclosure: Full-Disclosure

Most Linux distributions don't use tmpfs nor encrypt swap by default

 

 

Full Disclosure full-disclosure RSS feed   Index | Next | Previous | View Threaded


mark at suso

Apr 12, 2012, 6:22 AM

Post #1 of 8 (376 views)
Permalink
Most Linux distributions don't use tmpfs nor encrypt swap by default

Hello. After posting the flaw with libvte's handling of the scrollback
buffer (writing it to disk), there were several people who made the
erroneous claim that most distributions of Linux use tmpfs now and
encrypt swap and that this shouldn't be an issue.

Because these claims attempted to diminish the importance of the flaw
for many, I installed most of the popular distributions of Linux as well
as some of the BSDs for comparison to see what their default setup was
after installation. I have found that of the 35+ distribution versions
that I tested, only the latest Arch Linux puts /tmp on tmpfs by default
and the only other distributions that show it as an option during
installation are Mageia or PC Linux OS. So the libvte flaw indeed is a
widespread problem.

I've documented the results at:

http://www.climagic.org/bugreports/libvte-flaw-distro-defaults-chart.html


You can view the libvte bug report here:

http://climagic.org/bugreports/libvte-scrollback-written-to-disk.html


Extra Note: I'm not suggesting that everyone put their /tmp on tmpfs
and/or start using encrypted filesystem. There are other considerations
which I talk about in the document above.


--
Mark S. Krenz
IT Director
Suso Technology Services, Inc.

Sent from Mutt using Linux

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


tborland1 at gmail

Apr 12, 2012, 3:53 PM

Post #2 of 8 (359 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

Fedora Core 15:

/dev/mapper/vg_youwish-lv_swap swap swap
defaults 0 0
tmpfs /tmp tmpfs defaults 0 0

Removed other options it should have, but defaults do not include
nosuid,nodev,noexec.



On 4/12/12, Mark Krenz <mark [at] suso> wrote:
>
> Hello. After posting the flaw with libvte's handling of the scrollback
> buffer (writing it to disk), there were several people who made the
> erroneous claim that most distributions of Linux use tmpfs now and
> encrypt swap and that this shouldn't be an issue.
>
> Because these claims attempted to diminish the importance of the flaw
> for many, I installed most of the popular distributions of Linux as well
> as some of the BSDs for comparison to see what their default setup was
> after installation. I have found that of the 35+ distribution versions
> that I tested, only the latest Arch Linux puts /tmp on tmpfs by default
> and the only other distributions that show it as an option during
> installation are Mageia or PC Linux OS. So the libvte flaw indeed is a
> widespread problem.
>
> I've documented the results at:
>
> http://www.climagic.org/bugreports/libvte-flaw-distro-defaults-chart.html
>
>
> You can view the libvte bug report here:
>
> http://climagic.org/bugreports/libvte-scrollback-written-to-disk.html
>
>
> Extra Note: I'm not suggesting that everyone put their /tmp on tmpfs
> and/or start using encrypted filesystem. There are other considerations
> which I talk about in the document above.
>
>
> --
> Mark S. Krenz
> IT Director
> Suso Technology Services, Inc.
>
> Sent from Mutt using Linux
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/
>

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


mark at suso

Apr 12, 2012, 8:05 PM

Post #3 of 8 (345 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

On Thu, Apr 12, 2012 at 10:53:47PM GMT, Grandma Eubanks [tborland1 [at] gmail] said the following:
> Fedora Core 15:
>
> /dev/mapper/vg_youwish-lv_swap swap swap
> defaults 0 0
> tmpfs /tmp tmpfs defaults 0 0
>
> Removed other options it should have, but defaults do not include
> nosuid,nodev,noexec.

You obviously customized the install or changed it post installation as
this is not the default way it gets setup. Below is the filesystem
setup when using all the default options (no customization):

# df -hP
Filesystem Size Used Avail Use% Mounted on
rootfs 5.5G 2.1G 3.4G 39% /
udev 495M 0 495M 0% /dev
tmpfs 502M 272K 501M 1% /dev/shm
tmpfs 502M 612K 501M 1% /run
/dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /
tmpfs 502M 0 502M 0% /sys/fs/cgroup
tmpfs 502M 0 502M 0% /media
/dev/sda1 485M 30M 430M 7% /boot
/dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /tmp
/dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /var/tmp
/dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /home

Despite what the above looks like, /tmp is actually part of the root
filesystem.

Yes, of course you can change your setup post install or if you're
daring enough during the install, but that wasn't the point of the
research.


--
Mark S. Krenz
IT Director
Suso Technology Services, Inc.

Sent from Mutt using Linux

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


feighen at gmail

Apr 13, 2012, 4:59 AM

Post #4 of 8 (344 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

Hi Mark

I was interested in some of your BSD results. From what I remember of
the freebsd install it left all disk layout issues to the person
installing. Admittedly that was a few releases ago (6 branch mainly).
Has the install changed that much that it now recommends a disk
layout?

Thanks and kind regards
Feighen

On 13 April 2012 05:05, Mark Krenz <mark [at] suso> wrote:
> On Thu, Apr 12, 2012 at 10:53:47PM GMT, Grandma Eubanks [tborland1 [at] gmail] said the following:
>> Fedora Core 15:
>>
>> /dev/mapper/vg_youwish-lv_swap swap                    swap
>> defaults        0 0
>> tmpfs                 /tmp                    tmpfs   defaults        0 0
>>
>> Removed other options it should have, but defaults do not include
>> nosuid,nodev,noexec.
>
>  You obviously customized the install or changed it post installation as
> this is not the default way it gets setup.  Below is the filesystem
> setup when using all the default options (no customization):
>
> # df -hP
> Filesystem            Size  Used Avail Use% Mounted on
> rootfs                5.5G  2.1G  3.4G  39% /
> udev                  495M     0  495M   0% /dev
> tmpfs                 502M  272K  501M   1% /dev/shm
> tmpfs                 502M  612K  501M   1% /run
> /dev/mapper/vg_fedora15test-lv_root  5.5G  2.1G  3.4G  39% /
> tmpfs                 502M     0  502M   0% /sys/fs/cgroup
> tmpfs                 502M     0  502M   0% /media
> /dev/sda1             485M   30M  430M   7% /boot
> /dev/mapper/vg_fedora15test-lv_root  5.5G  2.1G  3.4G  39% /tmp
> /dev/mapper/vg_fedora15test-lv_root  5.5G  2.1G  3.4G  39% /var/tmp
> /dev/mapper/vg_fedora15test-lv_root  5.5G  2.1G  3.4G  39% /home
>
> Despite what the above looks like, /tmp is actually part of the root
> filesystem.
>
> Yes, of course you can change your setup post install or if you're
> daring enough during the install, but that wasn't the point of the
> research.
>
>
> --
> Mark S. Krenz
> IT Director
> Suso Technology Services, Inc.
>
> Sent from Mutt using Linux
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


packetnull at gmail

Apr 15, 2012, 4:47 AM

Post #5 of 8 (330 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

Interesting to know how free and net do encrypted swap as well. I know OpenBSD has an encrypt swapfs setting on its rc.conf file though not activated by default.



On Apr 13, 2012, at 5:59 AM, Feighen Oosterbroek <feighen [at] gmail> wrote:

> Hi Mark
>
> I was interested in some of your BSD results. From what I remember of
> the freebsd install it left all disk layout issues to the person
> installing. Admittedly that was a few releases ago (6 branch mainly).
> Has the install changed that much that it now recommends a disk
> layout?
>
> Thanks and kind regards
> Feighen
>
> On 13 April 2012 05:05, Mark Krenz <mark [at] suso> wrote:
>> On Thu, Apr 12, 2012 at 10:53:47PM GMT, Grandma Eubanks [tborland1 [at] gmail] said the following:
>>> Fedora Core 15:
>>>
>>> /dev/mapper/vg_youwish-lv_swap swap swap
>>> defaults 0 0
>>> tmpfs /tmp tmpfs defaults 0 0
>>>
>>> Removed other options it should have, but defaults do not include
>>> nosuid,nodev,noexec.
>>
>> You obviously customized the install or changed it post installation as
>> this is not the default way it gets setup. Below is the filesystem
>> setup when using all the default options (no customization):
>>
>> # df -hP
>> Filesystem Size Used Avail Use% Mounted on
>> rootfs 5.5G 2.1G 3.4G 39% /
>> udev 495M 0 495M 0% /dev
>> tmpfs 502M 272K 501M 1% /dev/shm
>> tmpfs 502M 612K 501M 1% /run
>> /dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /
>> tmpfs 502M 0 502M 0% /sys/fs/cgroup
>> tmpfs 502M 0 502M 0% /media
>> /dev/sda1 485M 30M 430M 7% /boot
>> /dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /tmp
>> /dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /var/tmp
>> /dev/mapper/vg_fedora15test-lv_root 5.5G 2.1G 3.4G 39% /home
>>
>> Despite what the above looks like, /tmp is actually part of the root
>> filesystem.
>>
>> Yes, of course you can change your setup post install or if you're
>> daring enough during the install, but that wasn't the point of the
>> research.
>>
>>
>> --
>> Mark S. Krenz
>> IT Director
>> Suso Technology Services, Inc.
>>
>> Sent from Mutt using Linux
>>
>> _______________________________________________
>> Full-Disclosure - We believe in it.
>> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
>> Hosted and sponsored by Secunia - http://secunia.com/
>
> _______________________________________________
> Full-Disclosure - We believe in it.
> Charter: http://lists.grok.org.uk/full-disclosure-charter.html
> Hosted and sponsored by Secunia - http://secunia.com/

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


pedro at ambientworks

Apr 15, 2012, 7:57 AM

Post #6 of 8 (327 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

> I know OpenBSD has an encrypt swapfs setting on its rc.conf file
> though not activated by default.

i believe it is activated by default:

http://marc.info/?l=openbsd-cvs&m=111185331505174

-p.

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


mark at slugbug

Apr 16, 2012, 12:51 PM

Post #7 of 8 (315 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

On Sun, Apr 15, 2012 at 02:57:33PM GMT, Pedro Martelletto [pedro [at] ambientworks] said the following:
> > I know OpenBSD has an encrypt swapfs setting on its rc.conf file
> > though not activated by default.
>
> i believe it is activated by default:
>
> http://marc.info/?l=openbsd-cvs&m=111185331505174
>

Thanks for catching that. Sorry, what I had in e-mail was wrong, but
the chart on the report is correct. I think I meant FreeBSD.


--
Mark S. Krenz
IT Director
Suso Technology Services, Inc.

Sent from Mutt using Linux

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/


jon+full-disclosure at alcopop

Apr 19, 2012, 6:45 AM

Post #8 of 8 (300 views)
Permalink
Re: Most Linux distributions don't use tmpfs nor encrypt swap by default [In reply to]

On Thu, Apr 12, 2012 at 01:22:30PM +0000, Mark Krenz wrote:
>
> Hello. After posting the flaw with libvte's handling of the scrollback
> buffer (writing it to disk), there were several people who made the
> erroneous claim that most distributions of Linux use tmpfs now and
> encrypt swap and that this shouldn't be an issue.

The libvte maintainers are considering changing things to use /var/tmp
anyway, so as to *avoid* tmpfs.

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Full Disclosure full-disclosure RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.