Slashdot Mirror


Data Breach Flaw Found In Gnome-terminal, Xfce Terminal and Terminator

suso writes "A design flaw in the VTE library was published this week. The VTE library provides the terminal widget and manages the scrollback buffer in many popular terminal emulators including gnome-terminal, xfce4-terminal, terminator and guake. Due to this flaw, your scrollback buffer ends up on your /tmp filesystem over time and can be viewed by anyone who gets ahold of your hard drive. Including data passed back through an SSH connection. A demonstration video was also made to make the problem more obvious. Anyone using these terminals or others based on libVTE should be aware of this issue as it even writes data passed back through an SSH connection to your local disk. Instructions are also included for how to properly deal with the leaked data on your hard drive. You are either encouraged to switch terminals and/or start using tmpfs for your /tmp partition until the library is fixed."

184 comments

  1. Skynet by Talderas · · Score: 5, Funny

    We have a means to strike back at Skynet using this breach in the Terminator systems!

    --
    "Lack of speed can be overcome. In the worst case by patience." --Znork
  2. first... by Anonymous Coward · · Score: 0

    ...to have my command history stolen!

  3. Where's the gun? by Jawcracker+Fuzz · · Score: 1

    Shoot the VTE lib. Gimmie back my ASR 33.

  4. How is this *really* a problem? by Anonymous Coward · · Score: 1

    You have to be root (or the user who was running terminal in the first place) to see the scrollback data.

    So, how is this different than all of the hack-tastic things that root can already do?

    1. Re:How is this *really* a problem? by jesseck · · Score: 4, Informative

      While the system is running, yes, you either need to be root or run an exploit which escalates your privileges so you can see the temp file. When the disk is removed from the system you don't need to be root to read the files. Nor would you need to be root if you booted from a LiveCD.

    2. Re:How is this *really* a problem? by Cley+Faye · · Score: 2
      Surely you missed this part of the summary (you didn't even need to read the article):

      and can be viewed by anyone who gets ahold of your hard drive

      When dealing with real security needs, you might want to know if data only seen through SSH end up on your hard-drive.

    3. Re:How is this *really* a problem? by fuzzyfuzzyfungus · · Score: 5, Informative

      If you are using a persistent /tmp, 'root' is anybody who mounts the HDD...

      Now, if you want scrollback data to be persistent across reboots, you have to suck it up and dump it to disk somewhere(user home might be a slightly better idea, since support for encrypting your home directory is slightly easier than for encrypting the entire disk); but if that isn't a requirement you probably don't want it touching the disk at all(unless you are in a very memory constrained and swapless environment where getting OOM killed every time something unexpectedly verbose happens would be really annoying).

    4. Re:How is this *really* a problem? by skids · · Score: 4, Informative

      It's a particular problem if you A) don't run on entirely encrypted partitions, and B) have your kit stolen or get rooted. Your biggest problem is that you had your kit stolen or got rooted, however, this problem effects the damage control process.

      Usually when you have a compromise you assume that only data that is "on the host" is compromised, and any data from other hosts is only compromised if it happened to be viewed after you got rooted (because the attacker could have been keylogging.) With cleartext from encrypted sessions hitting disk, this means that data could be sitting around in unused block in /tmp for years, so once you get rooted you have to assume everything ever done on other machines using a terminal on that machine has been exposed. So if you edited your corporate HQ's VPN PSK 2 years ago, that may still be on your disk.

      tmp is less likely to be on an encrypted media than other filesystems, because it is usually expected to be a performance bottleneck.

      The good news is that in many cases the data never got flushed back to disk and stayed in the filesystem buffers, but for high security concerns this is little consolation.

    5. Re:How is this *really* a problem? by Anonymous Coward · · Score: 0

      Unless /tmp was built using Luks...

      This is a non-issue in those cases.

      Console exploits (gaining access to the console of a running machine) are just the way things are...

    6. Re:How is this *really* a problem? by Anonymous Coward · · Score: 0

      Yeah, but the files are unlinked right after they're created so it's not as if they hanging around the filesystem. You'd still need use some form of data recovery to read the info from the disk after the machine is powered off. If someone has physical access to your drives, then you've got bigger problems than readable scrollback buffers.

    7. Re:How is this *really* a problem? by Anonymous Coward · · Score: 0

      (in thinking about the problem further:)

      The question of where to put stuff on the disk is actually slightly more vexed than I had first considered: In a networked environment, /tmp, not /home is a good place for temporary stuff for a reason. /tmp is almost certainly just a dirt-cheap slab of local disk, while /home/username is probably on a fileserver somewhere, lovingly stored and backed up by your IT minions, and subject to network latency. That's a lousy place for every program's random temporary crap. However, in a standalone installation, /tmp and /home are probably on the same disk, and that disk is more likely to be in a theft-prone laptop or similar. By default, encrypting /home is common and easy, encrypting the whole disk less so, so storing your various potentially-sensitive cruft somewhere in /home makes some sense.

    8. Re:How is this *really* a problem? by allo · · Score: 2

      what about terminal-history in your swap-partition?

    9. Re:How is this *really* a problem? by M1FCJ · · Score: 1

      Any unlinked (deleted) but still open file can be easily accessed via /proc until the process terminates. These files do hang around a lengthy amount of time.

    10. Re:How is this *really* a problem? by Sipper · · Score: 2

      Very much in agreement, but in some instances there are additional features that further mitigate this at least in the long-term.

      With cleartext from encrypted sessions hitting disk, this means that data could be sitting around in unused block in /tmp for years, so once you get rooted you have to assume everything ever done on other machines using a terminal on that machine has been exposed.

      One piece of good news is that some systems erase /tmp on startup. Debian does this, for one. But also last I knew, other systems don't. Someone had reported about a year ago that Fedora didn't do this, for instance. It came up because the poor guy was using a Debian-based box and had copied his entire home directory into /tmp, rebooted, and expected to copy it back. Oops. That got into discussion of which systems erased /tmp and which didn't.

      Additionally I've found that some newer Linux kernels in the 3.x series (at least 3.2) seem to mount /tmp as a tiny tmpfs filesystem, rather than using the root filesystem. [I've checked, and this is not something done in /etc/fstab. There's a tiny chance this might be something done via the initrd image, though.] tmpfs is still backed by swap, however.

    11. Re:How is this *really* a problem? by Jerry · · Score: 1

      ...'root' is anybody who mounts the HDD......

      IF someone has your HD then what's in /tmp is the least of your problems if you have secrets to hide.

      --

      Running with Linux for over 20 years!

    12. Re:How is this *really* a problem? by Anonymous Coward · · Score: 1

      One piece of good news is that some systems erase /tmp on startup. Debian does this, for one.

      Yes and no... Debian (and most other systems, I might add) only deletes the files/dirs that are still present on the filesystem (i.e. what "find" can find on /tmp). It doesn't try to securely wipe those data blocks or the data blocks that wasn't part of any of those files.
      The last part is important, cause in the case of libvte, the file is open()'ed, then unlink()'ed right away, thereby no longer showing up on the filesystem even though the file is still in-use. The close() won't happen until the terminal is closed. In other words: As the file is no longer present on the filesystem, it won't be deleted (again) from /tmp and the data blocks won't be wipe. Therefore the old data will still be present on the disk even after a reboot.

      You could probably change the boot script to use a more secure wipe of the files it's deleting, but that still won't help you in this case as the file in question was already delete long before the reboot. A complete wipe of /tmp's device won't be a good idea either, unless you're absolutely sure /tmp is on its own device, i.e. if /tmp is just an ordinary dir on /, you don't want to wipe all of / on boot up.

    13. Re:How is this *really* a problem? by Anonymuous+Coward · · Score: 1

      If you are using a persistent /tmp, 'root' is anybody who mounts the HDD...

      And in other news, the contents of memory may persist through reboots. It's not like the BIOS or the OS fill it with zeros on each reboot. You'll have to also unplug the power cord, yank the battery, etc.

    14. Re:How is this *really* a problem? by Sipper · · Score: 2

      One piece of good news is that some systems erase /tmp on startup. Debian does this, for one.

      Yes and no... Debian (and most other systems, I might add) only deletes the files/dirs that are still present on the filesystem (i.e. what "find" can find on /tmp). It doesn't try to securely wipe those data blocks or the data blocks that wasn't part of any of those files.

      Damn good point. I stand corrected.

      The last part is important, cause in the case of libvte, the file is open()'ed, then unlink()'ed right away, thereby no longer showing up on the filesystem even though the file is still in-use. The close() won't happen until the terminal is closed. In other words: As the file is no longer present on the filesystem, it won't be deleted (again) from /tmp and the data blocks won't be wipe. Therefore the old data will still be present on the disk even after a reboot.

      I think you're right. :-/

      You could probably change the boot script to use a more secure wipe of the files it's deleting, but that still won't help you in this case as the file in question was already delete long before the reboot. A complete wipe of /tmp's device won't be a good idea either, unless you're absolutely sure /tmp is on its own device, i.e. if /tmp is just an ordinary dir on /, you don't want to wipe all of / on boot up.

      I suppose one option would be a "secure wipe on free space" via the sfill command from the secure-delete package on the filesystem that /tmp is mounted on.

      IIRC at some point certain filesystems had a flag to set for a "secure delete" option, which would fill files erased with zeros when a file link count reached zero, but I don't recall whether any of these were actually implemented.

    15. Re:How is this *really* a problem? by Anonymous Coward · · Score: 0

      > Now, if you want scrollback data to be persistent across reboots, you have to suck it up and dump it to disk somewhere

      That's not what this is doing. I don't believe vte will look for and open older vte's temp files. Indeed it would have trouble because the file is immediately unlinked after being created.

      What they are doing is re-implementing swap in a specialist way for a single application to optimise for the use-case of keeping gigantic scrollbacks open in a process for a long time. Whereas I'd wager the most likely situation was the opposite: users with lots of RAM having terminals open for a comparatively short amount of time (hours or days at best versus weeks or months). So everyone is paying disk IO for the off-chance they're going to have an enormous scrollback that exhausts physical memory (at which point, you'd be paying in disk IO... when it swapped.)

    16. Re:How is this *really* a problem? by CSMoran · · Score: 1

      Yeah, but the files are unlinked right after they're created so it's not as if they hanging around the filesystem.

      There's no such thing as "right after" in a time-sharing system where multitasking is not cooperative. Unless the creation-and-unlinking happens atomically, which I doubt is the case, the process doing the unlinking can be preempted "right before" trying to do that.

      --
      Every end has half a stick.
  5. Green on black? by Anonymous Coward · · Score: 0

    Just because it's a bug report for a terminal emulator, doesn't mean it has to look like it's in a terminal emulator...

    1. Re:Green on black? by suso · · Score: 1

      You're just saying that because you don't read climagic

  6. mrxvt by Anonymous Coward · · Score: 0

    it rocks!

  7. Re:hell ya open source rules by Anonymous Coward · · Score: 0, Offtopic

    I would have responded sooner but this beachball would NOT go away.

  8. Aterm by phrostie · · Score: 2

    Aterm seems to be ok.
    i don't see it listed as using libVTE

    http://packages.debian.org/wheezy/aterm

    1. Re:Aterm by lindi · · Score: 1

      I might consider switching if aterm had at least support for clipboard (it only support X11 primary selection it seems, the one you access by pressing the middle mouse button. man aterm does not mention clipboard at all).

  9. Doesn't sound like a flaw to me by Anonymous Coward · · Score: 1

    This really sounds like how it was designed to work.

    Thats what /tmp is for, after all, is it not? Sounds like the problem would be solved by partitioning different users data into seperate, appropriately secured /tmp files.

    Is bash history a "flaw" too? I'm sure plenty of people don't know that it's a text file anybody with access to it can read.

    1. Re:Doesn't sound like a flaw to me by Cley+Faye · · Score: 1

      This really sounds like how it was designed to work.

      Thats what /tmp is for, after all, is it not? Sounds like the problem would be solved by partitioning different users data into seperate, appropriately secured /tmp files.

      Is bash history a "flaw" too? I'm sure plenty of people don't know that it's a text file anybody with access to it can read.

      Bash history is a different kind of threat; it's only about what command you used. Sure, you could get a few hostnames from it, but no more.
      Having your terminal session stored on disk mean that everything you see is suddenly on your filesystem, and staying on it if your /tmp is backed by the harddrive.

    2. Re:Doesn't sound like a flaw to me by skids · · Score: 3, Insightful

      People in the know know about cli history files. They don't necessarily expect data viewed in a terminal window to hit disk. It may or may not be a "flaw" depending on your opinion as to what appropriate security measures amount to, but it's worth an awareness campaign.

    3. Re:Doesn't sound like a flaw to me by Anonymous Coward · · Score: 1

      Some people execute commands that take a password as a command line argument.

      Besides even that, you can learn a lot about a person from their .bash_history. More than just a few hostnames. You can make some inferences at least.

    4. Re:Doesn't sound like a flaw to me by Anonymuous+Coward · · Score: 1

      Having your terminal session stored on disk mean that everything you see is suddenly on your filesystem, and staying on it if your /tmp is backed by the harddrive.

      No. If you open(O_CREAT) a file than immediately unlink it, and use the opened handle to store temporary data, that data has no more chance to hit the disk than regular memory being swapped out.

      Try to learn a bit about buffer cache and such stuff.

      This "bug" is about someone ignorant about security and how an OS works having his naive assumptions contradicted by reality.

    5. Re:Doesn't sound like a flaw to me by Anonymous Coward · · Score: 0

      Some people execute commands that take a password as a command line argument.

      Besides even that, you can learn a lot about a person from their .bash_history. More than just a few hostnames. You can make some inferences at least.

      True, but if you do a quick "unset HISTFILE" before you end your bash session, those commands won't be stored in your history and you might expect to be "safe".

      Unfortunately, because of this bug, unsetting HISTFILE won't help at all as the commands and their output will still be present in unlinked blocks on /tmp.

    6. Re:Doesn't sound like a flaw to me by Cley+Faye · · Score: 1

      Having your terminal session stored on disk mean that everything you see is suddenly on your filesystem, and staying on it if your /tmp is backed by the harddrive.

      No. If you open(O_CREAT) a file than immediately unlink it, and use the opened handle to store temporary data, that data has no more chance to hit the disk than regular memory being swapped out.

      Try to learn a bit about buffer cache and such stuff.

      This "bug" is about someone ignorant about security and how an OS works having his naive assumptions contradicted by reality.

      So, the fact that it does work with the current implementation of some terminal emulator doesn't count as reality?
      I didn't say that there is no good way to do this correctly...

    7. Re:Doesn't sound like a flaw to me by lindi · · Score: 1

      Did you actually test this? Here

      dd if=/dev/zero of=disk.img bs=1M count=5
      /sbin/mkfs -F -t ext2 disk.img
      sudo mount -o loop disk.img /mnt
      sudo chmod a+rw /mnt
      python -c 'import os; f = os.open("/mnt/a", os.O_CREAT | os.O_RDWR); os.unlink("/mnt/a"); os.write(f, "Hello world"); os.system("sync");';
      strings disk.img
      sudo umount /mnt
      rm disk.img

      seems to reliably find "Hello world" from the disk.img every time.

    8. Re:Doesn't sound like a flaw to me by Anonymuous+Coward · · Score: 1
      Sure, you're calling "sync" in order to force write all dirty buffers to disk immediately.

      Try it without the "sync".

    9. Re:Doesn't sound like a flaw to me by lindi · · Score: 1

      But terminals are open for a long time. Surely something in the system will call sync during the lifetime of a terminal emulator?

    10. Re:Doesn't sound like a flaw to me by gottabeme · · Score: 1

      What filesystems do you use that are never synced?

      --
      "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
    11. Re:Doesn't sound like a flaw to me by Anonymuous+Coward · · Score: 1
      What system do you use which trashes all its buffer cache from time to time, just for fun?

      Usually, a filesystem is fully synced only when it is unmounted, and that cannot happen while a process still holds a reference to a file on it.

      Instead of "sync" or "echo 3 > /proc/sys/vm/drop_caches" you can start some memory-hungry program, which will quickly eat up all your memory and force all buffers to disk (either in swap or in the filesystem). Problem solved ;-)

    12. Re:Doesn't sound like a flaw to me by gottabeme · · Score: 1

      I don't follow you. It's not about trashing the cache, it's about syncing. ext3 and ext4, for example, sync every 5 seconds by default.

      I really don't follow your second paragraph--it seems to contradict your point in the first. Now you seem to be saying, "Yes, indeed this terminal scrollback file will be written to disk." And that's the whole point: we don't want it to hit the disk.

      Even without syncing, manually or automatically, I routinely run low on RAM, my caches shrink, and stuff gets swapped. And on top of that, the kernel will, by default, swap out a few never-accessed pages even if it doesn't "need" to, because that space could be better used for cache.

      Anyway, I can't tell what point you're trying to make. :)

      --
      "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
  10. tmpfs by Sloppy · · Score: 4, Insightful

    You are either encouraged to switch terminals and/or start using tmpfs for your /tmp partition until the library is fixed.

    Once you go tmpfs, why would you ever go back, VTE flaws or not? tmpfs kicks ass.

    Then encrypt your swap (random key every boot; you don't even need to know a key to be coerced from you) and you have a safe /tmp.

    --
    As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    1. Re:tmpfs by camperdave · · Score: 1

      In some countries, it is illegal for you not to divulge the key to properly warranted authorities - even if you don't know what it is.

      --
      When our name is on the back of your car, we're behind you all the way!
    2. Re:tmpfs by Anonymous Coward · · Score: 0

      I've witnessed apt fail because it filled up tmpfs, though.

    3. Re:tmpfs by gzipped_tar · · Score: 1

      On a memory-limited system, one may not want /tmp kept as tmpfs in the RAM.

      --
      Colorless green Cthulhu waits dreaming furiously.
    4. Re:tmpfs by Anonymous Coward · · Score: 0

      Once you go tmpfs, why would you ever go back, VTE flaws or not? tmpfs kicks ass.

      Despite the whole flood thing, harddrive space is significantly cheaper than RAM. I've run into multiple situations where I need more space in /tmp than I have total RAM.

      Assuming you have sufficient free RAM, sure, tmpfs is absolutely wonderful.

    5. Re:tmpfs by dalias · · Score: 1

      It's not kept in ram. It's kept in virtual memory. Which might or might not be present in ram at any given time. Pretty much the same as data on the filesystem, which also might or might not be kept in ram at any given time.

    6. Re:tmpfs by X0563511 · · Score: 1

      Then set up a keyfile for swap and edit /etc/crypttab appropriately. If you're doing the rest right, your encrypted root will protect the swap then, as well - yet you can comply with law enforcement and hand over the keys if ordered., yet still helps protect you from the thieves and other asswipes.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    7. Re:tmpfs by GameboyRMH · · Score: 1

      My N900 with only a quarter-gig RAM uses tmpfs and it doesn't cause any trouble.

      --
      "When information is power, privacy is freedom" - Jah-Wren Ryel
    8. Re:tmpfs by Anonymous Coward · · Score: 1

      Encrypt swap? Who the hell uses swap these days?

      Lets says you have a mere 4GB of RAM. A small swap file of say 512MB would be useless considering how much you already have but if you go to 1GB+ size swap files then your machine is going to grind to a halt (ie. become useless) if you start swapping that much memory.

      Swap is useless and/or pointless if you have 2GB or more of RAM.

    9. Re:tmpfs by couchslug · · Score: 1

      "(you don't even need to know a key to be coerced from you)"

      Great. That just means a longer beating from the proverbial XKCD Crescent wrench....

      --
      "This post is an artistic work of fiction and falsehood. Only a fool would take anything posted here as fact."
    10. Re:tmpfs by Ceriel+Nosforit · · Score: 4, Informative

      In some countries, it is illegal for you not to divulge the key to properly warranted authorities - even if you don't know what it is.

      So what? In my country blasphemy is illegal. I'm not from the Middle East either, I'm a Finn. - Sometimes you just have to, grow a backbone, fuck Jesus in the ass and break the law.

      --
      All rites reversed 2010
    11. Re:tmpfs by Anonymous Coward · · Score: 0

      Tmpfs overflows into swap, which can be encrypted easily. (There are, of course, alternatives available if you wish to avoid this behavior.)

    12. Re:tmpfs by allo · · Score: 1

      why? When processes get bigger and harddrives get faster, the swapfiles can grow as well.

    13. Re:tmpfs by Rashkae · · Score: 2

      *Sigh*, this again. No matter how much memory you have, some of it will end up with accumulated cruft that rarely needs to be read/changed. That ram would be better used freed up (swapped out) and used for cache instead. And 2 GB is nothing compared to a modern Desktop (gnome, Unity, KDE, take your pic.) If you do any kind of multitaking of large applications, you need a minimum of 8GB before you can be safely swap free.

    14. Re:tmpfs by MrNemesis · · Score: 2

      Swap files may grow, but the speed of hard drives doesn't scale along with everything else. Take a good platter-based drive and you're lucky to see reads/writes of 20MB/s assuming little to no HDD contention, especially since swap is typically highly random non-sequential 4k access. RAID that up or us an SSD and you might get 50MB/s. Lets say you have a 512MB swap, as I do, it'll take 10s to read the whole thing. Take a 512GB swap (like one poor server I found at work - someone was following the appallingly stone-aged adage about swap=mem*2) and all of a sudden it's going to take you 3 hours to read back all that virtual memory.

      Compare that with some old memory, say some DDR-333, which has a transfer rate of over 2GB/s. Compare with the DDR3 in my workstation, capable of 12GB/s.

      Back when we were limited to miniscule amount of memory, lots of swap made sense because memory was horrifically expensive and it didn't take *that* long to read/write to, because the total amount of memory was still fairly small in comparison. But these days you're looking at wait times of 30 minutes or more if you want your entire swap space to be double your memory and to be used by the OS.

      Stick with a small swap file and not much crap ever gets written to disc, saving you the horror of having to reset a server for the umpteenth time when it's been grinding on its system disc for five minutes trying to page in the OOM killer.

      --
      Moderation Total: -1 Troll, +3 Goat
    15. Re:tmpfs by Anonymous Coward · · Score: 0

      It's useful if you have a laptop you wish to hibernate, since the content of your RAM is dumped in the swap. I wish it was done in another way since swap is mostly useless for anything else, and this method for hibernation forces a ridiculously large swap-partition. :/

    16. Re:tmpfs by izomiac · · Score: 1

      Linux is certainly getting more bloated, but the last I checked my whole system volume could easily fit into 4 GB of RAM with enough room left over for standard desktop usage. Caching data files is nice, but with an SSD that shouldn't be noticeable, nor does it work if you're unlikely to reopen files. Obviously, different usage patterns have different requirements, but, for me, the only time I hit my RAM limit in any OS is with a memory leak (Firefox -- which happens daily if I let it). Not swapping should improve performance, security, and privacy, and the only "cost" is not being able to run highly inefficient applications (or memory-limited number crunching if that's your job/hobby).

    17. Re:tmpfs by Anonymous Coward · · Score: 1

      The actual, and often ironic, definition of blasphemy is speaking for God, i.e. putting words in his mouth. for example saying "God hates gays" is blasphemous. The key is that the speaker must raise themselves to the level of God in order to make such claims, and that's the serious no-no. God doesn't care if you insult him in some lowbrow way, because he has a smite button and you don't.

    18. Re:tmpfs by Anonymous Coward · · Score: 0

      compile thunderbird...more than 4gigs of temp and counting

    19. Re:tmpfs by mrmeval · · Score: 1

      I shall look but you seem to know how to setup and configure to use tmpfs for /tmp. I'm using LXDE and they use tmpfs for some things but I'm unsure if /tmp exists there. Thanks.

      --
      I'd go on a Vegan diet but the delivery time from Vega is too long. --brownkitty
    20. Re:tmpfs by Anonymous Coward · · Score: 0

      No, he's implying that break the law is.

    21. Re:tmpfs by allo · · Score: 1

      better the computer gets slow, because its swapping, than the computer starts killing random processes because its running out of memory.
      And today running out of memory means, you need to think in hundreds of mb, because when most programs use more memory on normal operation, they will request more memory when the system is short of memory, too.

    22. Re:tmpfs by Anonymous Coward · · Score: 0

      But what reason do you have to compile Thunderbird on a cell phone? You know, other than the "because I can" compulsion?

    23. Re:tmpfs by gottabeme · · Score: 1

      Do you even run X? I have systems with 3 and 4 GB of RAM and they still end up sucking up more and more RAM and swapping stuff out if I have a long enough X session and use a modern web browser. If I had 2 GB and no swap I'd hit the OOM killer every few days at least.

      --
      "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
    24. Re:tmpfs by gottabeme · · Score: 1

      > Stick with a small swap file and not much crap ever gets written to disc, saving you the horror of having to reset a server for the umpteenth time when it's been grinding on its system disc for five minutes trying to page in the OOM killer.

      Great theory, but in reality it would hit the OOMk too often and random processes would die too often. Hey, I've suffered swap-of-doom plenty of times, so I know what you mean and feel the pain--but the alternative is worse.

      What really does help is zramswap. Makes a compressed ramdisk and uses that as swap before the disk swapfile. Much faster than swapping to disk. Google for zramswap-enabler. Works perfectly out-of-the-box on Ubuntu.

      --
      "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
    25. Re:tmpfs by gottabeme · · Score: 1

      It fits at first--but after a day or two it doesn't. Then you have to restart X, or at least log out/in.

      --
      "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
    26. Re:tmpfs by Sloppy · · Score: 1

      Swapping to read files from tmpfs is going to grind slower than using a disk filesystem for /tmp? I guess it's time to do some benchmarks because if it's true, I'd call that a tmpfs bug.

      People are telling me don't use disk because it's too slow, but don't use ramdisks because their computer doesn't have enough RAM. The only thing people can agree on, is that I'm wrong.

      --
      As copyright owner of this comment, I authorize everyone to defeat any technological measure which limits access to it.
    27. Re:tmpfs by harrkev · · Score: 1

      better the computer gets slow, because its swapping, than the computer starts killing random processes because its running out of memory.

      Not in my case. I would MUCH rather my machine kill a huge memory-hog process rather than let my 8GB desktop machine thrash and die. If a process is going to start swapping, then it will take FOREVER to finish. I would rather have it die. That way, I can tell what is happening and still control my computer. Then, I can throw the job on one of grid machines with 64GB and get back to work.

      I am not really a Linux guru, but I added this to my startup scripts:
      ulimit -m 7000000
      I did a bunch of googling, and this is SUPPOSED to kill jobs that go over about 7 gigs or so (not getting into the giga vs. gibi nonsense). I have not had any really huge jobs lately, but one mis-coded Verilog construct can cause a simulator to suck infinite memory. Been there, done that.

      --
      "-1 Troll" is the apparently the same as "-1 I disagree with you."
    28. Re:tmpfs by allo · · Score: 1

      yes, and the ulimit is useful. But do not rely on the out-of-memory-killer of the kernel, it tends to kill completely unrelated processes first before killing the memleaking one.

  11. Cheers, Behdad Esfahbod, nice one by Rogerborg · · Score: 0
    This guy, right?

    Interesting choice of inspirational quote:

    It is amazing what you can accomplish if you do not care who gets the credit. - Harry S Truman

    The same applies to blame, Behdad.

    --
    If you were blocking sigs, you wouldn't have to read this.
    1. Re:Cheers, Behdad Esfahbod, nice one by Anonymous Coward · · Score: 0

      Not according to Behdad it doesn't:

      https://bugzilla.gnome.org/show_bug.cgi?id=664611

      Instead of fixing the security hole in VTE he'd rather accuse the poster of trying to garner some sort of "fame" from reporting the bug, he even threatens in his own comments to put off fixing the bug if he's further "insulted." Rather amusing that he's running around Slashdot telling everyone to read the thread for the bug more closely, the more closely you read it the more you realize that Behdad is just an overgrown infant with an inferiority complex...and everyone using libVTE is suffering for it.

  12. Re:hell ya open source rules by Mikkeles · · Score: 0

    You got that half right.

    --
    Great minds think alike; fools seldom differ.
  13. Not a bug by Anonymous Coward · · Score: 5, Insightful

    This is not a bug. This is exactly how /tmp is meant to be used. It is no different from sensitive data from your internet cache being stored on the hard drive.

    If your garbage data is sensitive, you should encrypt /tmp, or mount a tmpfs there.

    1. Re:Not a bug by fluffythedestroyer · · Score: 1

      The op never mentionned it was a bug. Just a flaw. There is a big difference between bug and flaw.

    2. Re:Not a bug by M1FCJ · · Score: 1

      My browser cache is not stored on /tmp for all to see. It's stored on ~/ and that's more likely to be encrypted (thanks to Ubuntu and other distributions which make it very easy).

    3. Re:Not a bug by garyebickford · · Score: 1

      There is a big difference between bug and flaw.

      ... Yes, when you step on a flaw, it doesn't get squished!
      *rimshot* :D

      --
      It's easier to be a result of the past, but more fun to be a cause of the future! http://www.spacefinancegroup.com/
    4. Re:Not a bug by Anonymous Coward · · Score: 0

      Not when it's a flaw that a GNOME developer has to fix, apparently. In fact, if it's Behdad you're dealing with the flaw won't be "squashed" at all, because he'll be too busy trying to save karma on Slashdot and vilifying the person who reported it to actually, you know, do his job.

  14. hello, this occurs with swap too by WatchMaster · · Score: 3, Informative

    This is true of vi and many other programs. The exact same issue occurs with the swap partition.

    Anyone can solve this problem, just mount /tmp and swap using dm-crypt with a new random password every reboot. The partitions are perfectly good while the computer is booted, but are inintelligible afterwards.

    1. Re:hello, this occurs with swap too by Anonymous Coward · · Score: 0

      Your swap partition, if you use it, should of course be encrypted. But there's not much point in having /tmp on an encrypted disk partition instead of in tmpfs. As long as it stays in RAM it will be written and read much faster, and if it is swapped to disk it will be encrypted anyway since the swap partition is encrypted. No information from /tmp will leak across reboots.

    2. Re:hello, this occurs with swap too by Barbara,+not+Barbie · · Score: 1
      ... or just don't use swap. It's not like you need it any more. I'm running with no swap partition, no swap file, and even with openoffice and eclipse and firefox and opera open, I still use less than a gig of ram.

      Of course, I also close firefox every day - it leaks memory.

      --
      Let's call it what it is, Anti-Social Media.
    3. Re:hello, this occurs with swap too by HyperQuantum · · Score: 1

      Correct me if I'm wrong, but isn't swap space also used for hibernation? So if you are encrypting it with a throwaway key each time, how will the kernel be able to restore a hibernated session from disk?

      --
      I am not really here right now.
    4. Re:hello, this occurs with swap too by WatchMaster · · Score: 1

      That is true. for laptops or computers you are hibernating one should just use the same encryption key for swap as for the other volumes on the disks.

  15. Is konsole affected? by fnj · · Score: 1

    Well?

    1. Re:Is konsole affected? by suso · · Score: 3, Informative

      I haven't had time to look into it completely, but when you have konsole set to unlimited scrollback mode, it will create files in /tmp/kde-username/konsole*.tmp that have your scrollback buffer. It is encoded somehow, but its there. I'm not sure if its encrypted or not. I found out about it because when I talked with the libvte developer (Behdad), he said that he looked at the code in Konsole to see how they did it before writing the implementation in libvte.

    2. Re:Is konsole affected? by CanHasDIY · · Score: 1
      From TFA:

      Note: I do not recommend konsole because it has the same issue with writing scrollback buffer to disk. It encodes the data so it is not as visible, but it would be trivial to decode that data.

      --
      An enigma, wrapped in a riddle, shrouded in bacon and cheese
    3. Re:Is konsole affected? by zeldor · · Score: 2

      It looks like only if the scrollback size is unlimited or at least really huge.
      I have 1000 line scroll back and konsole creates no such files in /tmp.

      --
      If I could walk that way I wouldnt need cologne.
    4. Re:Is konsole affected? by Anonymous Coward · · Score: 0

      It's encoded, not ecrypted, so it's very *easy* to get the plaintext.

  16. My hard drive ... by PPH · · Score: 1

    ... contains lots of stuff much worse than scrollback buffers should some nefarious character manage to lay hands on it.

    Aside from that, any /tmp (physical or volatile) can be a problem on a multiuser system if the app is dumb enough to create files with go+r permissions. If this isn't done, those files are as secure as any in my home directory.

    --
    Have gnu, will travel.
    1. Re:My hard drive ... by Anonymous Coward · · Score: 0

      Here's what gnome-terminal does on my Ubuntu box:

      1945 open("/tmp/vte7GW0AW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 30
      1945 unlink("/tmp/vte7GW0AW") = 0
      1945 open("/tmp/vte69W0AW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 30
      1945 unlink("/tmp/vte69W0AW") = 0
      1945 open("/tmp/vteF650AW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600) = 30
      1945 unlink("/tmp/vteF650AW")

      So, files with 600 permission and unlinked right after creation. What's the problem again? Someone having unauthorized physical access to your machine can read your files if your disks are unencrypted? Well, duh.

    2. Re:My hard drive ... by M1FCJ · · Score: 1

      Doesn't matter if your disks are encrypted or not. Anyone has root level access can have a peek at your terminal buffer extremely easily.

    3. Re:My hard drive ... by Anonymous Coward · · Score: 1

      Anyone with root access can most likely also read program memory, so keeping it in memory isn't going to help you either.

  17. Who doesn't have /tmp as a tmpfs at this point? by Mysticalfruit · · Score: 3, Interesting

    considering how much /tmp gets used, having it in memory is one of the quickest ways to boost the performance of your system...

    --
    Yes Francis, the world has gone crazy.
    1. Re:Who doesn't have /tmp as a tmpfs at this point? by Just+Some+Guy · · Score: 1

      With all the layers of caching between an application and the spinning drive, isn't /tmp (and every other filesystem) essentially in-memory anyway (at least for short-lived files)?

      --
      Dewey, what part of this looks like authorities should be involved?
    2. Re:Who doesn't have /tmp as a tmpfs at this point? by Anonymous Coward · · Score: 1

      No. This is one of the more common misconceptions.

      tmpfs is an entire filesystem in memory. It stores objects directly in memory. It is MUCH MUCH faster than a regular filesystem because its metadata keeping is much cleaner, simpler, and it is hot-cache-aware. This is speedup 1.

      tmpfs does not have a backing store device other than swap, while a normal filesystem does. A normal filesystem HAS to evict dirty pages and metadata to the backing store, even if you created and destroyed a file before the writeback got to it, it will still generate IO eventually even if it is just for the metadata. This is tmpfs speedup number 2.

    3. Re:Who doesn't have /tmp as a tmpfs at this point? by evilviper · · Score: 1

      I benchmarked this about a year ago on a couple RHEL5 servers. A particular application wrote out a few MBytes of tmp files everytime the application was asked to sort some data... which was so often we were talking hundreds of megabytes... vastly more IO than /tmp on a normal system would ever see.

      Anyhow, long story short, moving /tmp to tmpfs (RAM) made absolutely no performance improvement at all. In fact it was a small slowdown... I assumed this was because it was pushing some buffers/cache out of physical, but I admit the effect was small enough to just have been a margin of error.

      This also agrees with some coding I did before, changing code from writing out temporary files (not in /tmp), to piping the data directly. After putting the time in on that, trying for any speed-up, I also found no measurable speed-up.

      Long story short, I mount /tmp as async,noatime, and never give RAM disks a second though since. Without some real world benchmarks (Firefox start-up times, or something), I don't buy the premise that tiny bits of disk IO in temporary files is a bottleneck for anything.

      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  18. Thank you Solaris.... by Anonymous Coward · · Score: 0

    For making /tmp out of the virtual memory pool - there is no *on disk* image to read. when the box is rebooted, /tmp is empty - always.

  19. Umm by Viol8 · · Score: 3, Interesting

    If someone has physically stolen your computer then the thief being able to read old terminal sessions is the least of your worries.

    1. Re:Umm by gzipped_tar · · Score: 4, Insightful

      The problem is your terminal history may include data from other hosts, decrypted. Therefore it's not just "your" worries.

      --
      Colorless green Cthulhu waits dreaming furiously.
    2. Re:Umm by X0563511 · · Score: 1

      LUKS. LUKS. LUKS.

      Theft of a workstation or laptop drive should not threaten the rest of the network.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    3. Re:Umm by Anonymous Coward · · Score: 0

      The problem is your terminal history may include data from other hosts, decrypted. Therefore it's not just "your" worries.

      So might your swap file, but most people don't encrypt that either. Seriously, you lose physical of your machine, you're screwed unless the entire disk is encrypted. I don't see what's so exciting about this story.

    4. Re:Umm by xaoslaad · · Score: 1

      what does that have to do with the rising price of tea in china? If you use LUKS to encrypt the entire disk as is very easily doable in many distros (name one: Fedora/RHEL) then they aren't going to get your SSH keys either. They're on an encrypted file system. Good luck with that.

    5. Re:Umm by allo · · Score: 1

      where is the problem with ssh-keys? mine has a looooooong password.

    6. Re:Umm by behdad · · Score: 5, Informative

      You have to read the bugzilla report carefully to see what this story is about. I'm the developer being [bf]lamed. I offered to find time on a weekend and fix the issue. But the reporter ignored my offer and went ahead to post this on as many places as it could. In the report, he masks that, and instead says I don't consider it a bug. The report is intentionally written misinformed IMO. Which makes me think the true story is that he wanted to get some publicity...

    7. Re:Umm by Anonymous Coward · · Score: 0, Informative
      Rubbish.

      In the bugzilla thread, you immediately went apeshit when the reporter didn't like any of your suggestions. You even suggested that he could fork VTE!!! What a pompous, arrogant, load of crap.

      Instead of spraying all over slashdot trying to cover your ass, shouldn't you be spending the time closing the security hole you opened in your code?

      You have got one thing right though. People *should* read the bugzilla thread -- it really shows what charming people there are working on Gnome.

    8. Re:Umm by Shark · · Score: 3, Interesting

      Bug aside, from reading the rest of these threads, it seems to me like GNOME devs are getting quite a bad reputation these days. Sure, there's no way to make everyone happy and I wouldn't expect anyone to undertake this sort of impossible challenge. This being said, all the scorn must come from somewhere. My humble opinion is that once you reach a critical mass of users, enforcing a new grand-vision that the majority of those users (the ones who acutally chose to use GNOME, not those who don't know what a DE is) do not agree with is very likely to cause quite a bit of backlash... Case in point, GNOME developers as a whole being bashed for what essentially is one bug in one lib by one person.

      Sure, there's a large portion of users who aren't technical whom one might think they are catering to when they remove features considered 'too complex'. The fact is though that these are the people who don't even care what DE they're using, they're not loyal customers, they're just not interested in what you've done so long as it works for them. The only base GNOME has truly alienated is the base that had made a very conscious and educated choice to use that DE on its technical merits, the ones who felt that the DE allowed them to work the way they want to work. Sure you can change all that but only at the cost of those users. They don't take kindly to what pretty much amounts to: Look, the way you used your computer is stupid, we'll force our alternative on you.

      So, as the flames rage on and you feel the burn, remember that the GNOME team doused itself in gasoline prior to this.

      --
      Mind the frickin' laser...
    9. Re:Umm by Whitemice · · Score: 1

      I agree; this is a case of "nothing to see here, move along.".. Don't let it get to you. GNOME Terminal works great and the scrollback is fantastic. Thank you for your contribution.

      --
      Using "Common Sense" is being either to arrogant or to ignorant to ask people who know more about something than you.
    10. Re:Umm by Whitemice · · Score: 3, Interesting

      I'm a long time GNOME user, not a GNOME developer.

      Bug aside, from reading the rest of these threads, it seems to me like GNOME devs are getting quite a bad reputation these days

      Nope, they rock. When KDE did there big roll-out of KDE4 the lists *EXPLODED* with the wailing and gnashing of teeth. KDE4 arrived stable and that loud minority either adapted or went on the something else. Much the same thing happened with GNOME3 - although less than I expected. I moved to GNOME3 from GNOME2 and within a week it was clear that it was a superior system. But some adaptation was required.

      And this particular bug is nonsense. Basically: if someone steals your harddrive they can read your data! Really? Wow, that's a surprise. This has always been true, is true of /home, /var. and everything else unless you encrypt everything.

      This being said, all the scorn must come from somewhere.

      Yes, it comes from a vocal minority who don't realize all these changes where discussed and made out-in-the-open. Now they enjoy pitching a fit and claiming the design changes are somehow being forced upon them.

      My humble opinion is that once you reach a critical mass of users, enforcing a new grand-vision that the majority of those users (the ones who acutally chose to use GNOME,

      Well, I'm one that uses GNOME ~9 hours a day. For work.

      GNOME developers as a whole being bashed for what essentially is one bug in one lib by one person.

      Eh. Spend time producing ANY kind of content and you'll eventually get someone who thinks they can get themselves some BLOG karma by bashing you.

      The only base GNOME has truly alienated is the base that had made a very conscious and educated choice to use that DE on its technical merits, the ones who felt that the DE allowed them to work the way they want to work.

      I want to work efficiently. GNOME3 lets me do that... more than GNOME2 did. This is an important distinction from, based on mail list traffic, people who apparently *NEED* to see the real-time weather report for three cities in the panel clock in order to be productive. I think the group primarily 'alienated' by GNOME3 are the "tweakers". They have a computer almost for the sole purpose of tweaking the appearance of the user-interface. One reads much of those posts and says "eh? really? don't you have something to *do*.".

      we'll force our alternative on you.

      The use of the term "force" in this context is bogus.

      remember that the GNOME team doused itself in gasoline prior to this

      Nah, they doused themselves with awesome.

      --
      Using "Common Sense" is being either to arrogant or to ignorant to ask people who know more about something than you.
    11. Re:Umm by Anonymous Coward · · Score: 0, Informative

      Very cute how you modded yourself up there, Behdad. And exactly how are we supposed to read the bugzilla report "very carefully" when you've had one of your GNOME dev friends close it from public viewing?

      https://bugzilla.gnome.org/show_bug.cgi?id=664611

      That's right folks, a GNOME dev's answer to a glaring security flaw is to try and shut people up from talking about it, and particularly from criticizing his poor response. Now Behdad can tell people whatever story he likes because his actual words are no longer available to be viewed by the public, who are the ones being affected both by his arrogance and his negligence.

      Go ahead, mod me down with the many accounts that you've created in the past few hours to boost your own karma. You know, rather than actually fixing the damn bug. Incidentally, guess who _did_ fix the damn bug? Kees Cook, a developer for Ubuntu provided a patch in the thread that is now _also_ no longer available to the public, thanks to Behdad. That's right, a fix is available, made by an Ubuntu developer (worth mentioning that Behdad himself used to be a Redhat employee), but because Behdad has made a public embarrassment of himself now we don't even get access to _that_, let alone see the truth of the sort of person he really is. The absolute height of irresponsibility, Behdad. You're an embarrassment to the entirety of the GNOME project, and if you think this is going away just because you managed to coax one of your friends into censoring the bug report you're a sadly mistaken, pathetic little man.

    12. Re:Umm by Anonymous Coward · · Score: 0

      I could never remember the password, so I switched to using an ssh-key to protect my ssh-key.

  20. How is this is this different to shell history? by Viol8 · · Score: 3, Insightful

    Various shells store command history as a .[shell name]_history file in the users home directory which can be left between sessions. Thats happened for years and root can view that too.

    Sure, this may be a bug but frankly its a non issue.

    1. Re:How is this is this different to shell history? by gzipped_tar · · Score: 1

      Shell history doesn't contains only input, not output.
      Someone may have splashed some GPG private keys to the terminal, and the output ends up in the filesystem blocks.

      --
      Colorless green Cthulhu waits dreaming furiously.
    2. Re:How is this is this different to shell history? by Dcnjoe60 · · Score: 1

      Various shells store command history as a .[shell name]_history file in the users home directory which can be left between sessions. Thats happened for years and root can view that too.

      Sure, this may be a bug but frankly its a non issue.

      It might not be a high risk issue, but it probably should still be fixed.

    3. Re:How is this is this different to shell history? by truedfx · · Score: 2

      Aside from that, shell history doesn't contain anything not entered into the shell. Particularly, it doesn't contain anything entered into another remote shell.

    4. Re:How is this is this different to shell history? by Anonymous Coward · · Score: 0

      Shell history, on my machines at least, contains only the commands processed in that shell terminal. So 'cd', 'ls', 'passwd' and the like will all be there, but not the output of those commands. This is returning both the commands and the output of them, buffer..., which depending on how you look at it, shouldn't be occurring. Especially since, when running sync, as the he does in the video, it should clear the buffer content if it does exist on the fs, yet clearly the buffer output shows up in tmpfs.

      Is this actually a bug? Yes, and no. If it is entirely dependent upon how tmpfs is set up, this is a configuration bug which should either be dealt with in practice, or a software solution workaround be put in place.

    5. Re:How is this is this different to shell history? by behdad · · Score: 0

      And I offered to fix it, but the reporter decided to ignore that and public the report, claiming that I said I won't fix it. I think the slashdot bragging rights were more interesting to him. :)

    6. Re:How is this is this different to shell history? by Anonymous Coward · · Score: 0

      Well it's pretty obvious that it's more important to him than security in GNOME is to you. Regardless of his intentions it doesn't make your response any less irresponsible and lacking in professionalism. I'm glad this went public, the fact that people like you are "working" on GNOME should be made available to the public so they know the risks they're taking by using your code.

      That is, unless you're going to stop your pointless bickering and finger-pointing and fix libVTE instead of scrambling all over Slashdot trying to justify your poor decisions?

    7. Re:How is this is this different to shell history? by smolloy · · Score: 1

      I think the slashdot bragging rights were more interesting to him. :)

      What an arrogant prick you really are. He replied to your suggestions telling you that they weren't helpful, and that you should just rip the code out. He was right. Your response? You told him to fork VTE!!!! Seriously? A shining example of free-software, this is not.

    8. Re:How is this is this different to shell history? by M1FCJ · · Score: 1

      You offered to work around the flaw, not fix it. Completely different things.

  21. Overblown by AliasMarlowe · · Score: 4, Insightful

    ...to have my command history stolen!

    That would be in your .bash_history file (or whatever you name it locally).

    Really, this is way overblown by calling it a "data breach": it's not as if your data is compromised to a remote attacker. It requires that somebody else has your disk. As we all know, if your hardware is stolen/confiscated/impounded/seized/whatever, only encryption can keep your data safe. Apparently, even that can be circumvented by legal compulsion.

    --
    Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    1. Re:Overblown by masternerdguy · · Score: 2

      The real problem is disk space usage. Eventually that file may grow to millions of terrabytes. This is the memory leak from hell.

      --
      To offset political mods, replace Flamebait with Insightful.
    2. Re:Overblown by behdad · · Score: 5, Informative

      That's misinformed. Vte creates files in /tmp, and immediately delete them. So, the space will be reclaimed as soon as the terminal tab in question is closed. I know this is how it works, because that's how I wrote it.

    3. Re:Overblown by Anonymous Coward · · Score: 0, Interesting

      Funny, Behdad, I thought you weren't going to pay attention to this bug: https://bugzilla.gnome.org/show_bug.cgi?id=664611

      I suppose once your name hit Slashdot you decided to change your tune, did you? Because it sure sounds like you're an arrogant prick from the thread you and Andre are trying to suppress.

    4. Re:Overblown by Anonymous Coward · · Score: 2, Insightful

      So on a running system (using LUKS or not), any user that has read-permissions on the block device (members of i.e. group disk) containing /tmp will be able to see all other user's input? how sweet! And why delete them? A process that uses a file to write data, will keep using this space until closed anyway, so you might as well just show they're actually there taking up space? Or is there something in these files that isn't supposed to be easily seen? oh wait.

      This is not only a risk for offline filesystems (when the disks are yanked out), but also for running systems with multiple users (i.e. using freenx, x2go, etc). While fully admitting my complete and utter inability to program sh*t, I do feel this is to be considered a grave security issue, not even .

    5. Re:Overblown by KarlH420 · · Score: 1

      Yes, temp data is written to /tmp/

    6. Re:Overblown by DarwinSurvivor · · Score: 1

      Those same users that have read access to the disk could just as easily read you .bash_history folder or your entire home directory for that matter. Giving a user read permissions on disks is about as close to "physical access" as you can get.

    7. Re:Overblown by Anonymous Coward · · Score: 1

      The .bash_history file shows the commands that you run locally. This tmp file breach shows everything (including data, not just commands) that you've seen on a remote system.

    8. Re:Overblown by Anonymuous+Coward · · Score: 1
      And any user who has read access to /dev/mem can read everything from there, /tmp files or not.

      What's your point? Are you assuming that putting random users in the "disk" group is safe?

    9. Re:Overblown by AliasMarlowe · · Score: 2

      Yes, temp data is written to /tmp/

      Indeed. And everything created in /tmp also has drwx------ permissions (by default on all of my systems). So even with several users simultaneously logged-in, the files of one user in /tmp are not accessible to other logged-in users except those with root privileges, and they can access almost anything anyway, if they want to.

      Which is not to say it couldn't be done better, so that it would not be available to others - not even root, and not even if the disk were stolen. Suggestions for this include having /tmp encrypted with unique-per-login key, or using a RAM-only /tmpfs instead. Many additional precautions would be needed to bring security of other user data to comparable levels.

      As a "data breach", this is rather overblown.

      --
      Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    10. Re:Overblown by Anonymous Coward · · Score: 0

      Interesting. I get

      You are not authorized to access bug #664611. To see this bug, you must first log in to an account with the appropriate permissions.

      when trying to view your link. Is there sensitive information in there?

    11. Re:Overblown by hyc · · Score: 1

      Yes, it's overblown, but tmpfs is not a reliable solution. If the system is under heavy enough load and memory pressure, the tmpfs contents may get swapped out to disk anyway.

      And oh yeah, the swap partition on your disk is a liability too. But anytime someone has physical access to your disk, all bets are off anyway...

      --
      -- *My* journal is more interesting than *yours*...
  22. Nothing to see here ... by dgharmon · · Score: 1

    Nothing to see here, and moving on .. so you have access to the tmp directory which may have a record of what you viewed during the session ...

    --
    AccountKiller
  23. What about Konsole? by Dcnjoe60 · · Score: 1

    Does this impact KDE's Konsole, too?

    1. Re:What about Konsole? by Anonymous Coward · · Score: 0

      h.a.y.r.t.f.a.

    2. Re:What about Konsole? by bvimo · · Score: 1

      Have a read of this fine reply earlier http://linux.slashdot.org/comments.pl?sid=2714201&cid=39288993.

      --
      In either case, here at Microsoft, we feel standards are important. And we have fun, too. Doug Mahugh, Microsoft
    3. Re:What about Konsole? by Dcnjoe60 · · Score: 1

      Yeah, I saw that after I posted,

  24. XTerm FTW! by denvergeek · · Score: 1

    Now get of my lawn!

    1. Re:XTerm FTW! by denvergeek · · Score: 1

      That should be "off". Now get off my lawn!

    2. Re:XTerm FTW! by Anonymous Coward · · Score: 0

      Agreed. I just wish CLIPBOARD was fixed by default everywhere.

  25. but but but... by Anonymous Coward · · Score: 0

    I thought linux systems were bulletproof ?!

  26. mrxvt FTW! by Anonymous Coward · · Score: 0

    ever since MGT withered on the vine.

  27. I'd be a little miffed by DarkOx · · Score: 5, Insightful

    If I were the author of this library I'd be a little annoyed. The article is written as if the library does something wrong. It does not. It stores data on /tmp, which is there to be used as scratch space. To read the file you have to be the owner or root, which has been true of every process that has written there since before my years. This is perfect correct.

    Okay some uses might not expected their terminal emulator to keep temporary files. Yes if your disk is appropriated someone not root in your environment might be able to read it. Which is true of basically any process that writes anything to disk anywhere; even ones that don't. Suppose my system is under enough VM pressure that my good old fashion xterm gets paged out? Why scroll back buffer data, which might even have come from SSH would be right there on my disk! OH! NOS!

    If you are dealing with a system that is physically insecure, like a laptop, or machine in a public spot, or information that is so sensitive you'd be more concerned about it being out there than the fact that your hard disk or entire system has gone missing; there is a solution for that. Its called disk encryption! If you use Linux it won't even cost you anything!

    --
    Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    1. Re:I'd be a little miffed by Anonymous Coward · · Score: 0

      I agree.

      There's nothing wrong with the library's implementation.

      Does the author of the article expect magic of some sort here?
      I get it - he should have wrote the tmp file to /dev/magic.
      If anything, the author of the library should get an apology.

      This is a low-quality non-issue by someone wanting to make a
      name for himself, IMHO.

    2. Re:I'd be a little miffed by behdad · · Score: 1
    3. Re:I'd be a little miffed by formfeed · · Score: 1

      It's also a little like complaining that your basement window doesn't have curtains while your have a glass door in the front

      DataBreach in gnome terminal sounds serious! But a tmp-file that can be read by root? Come on! Sure, it can be done safer. But no biggie compared to all the other crap. /tmp is at least a place I already know has to be cleaned. Even the encrypted linux tutorials warn about it. There are a million more places in my home directory that are less safe if someone is root or has the hard drive. All the zeitgeist, couchdb, smart indexing stuff..? Nautilus puts file annotations simply into user's home. If a true-crypt volume gets unmounted, they're still there. File preview, the same thing.

  28. Yet another reason to switch to KDE permanently. by Anonymous Coward · · Score: 0, Informative

    Just take a look at what the GNOME developers call "community relations" these days:

    https://bugzilla.gnome.org/show_bug.cgi?id=664611

    The very first person that tries to protest the lack of response by the VTE developers gets his account disabled immediately. And people wonder why GNOME 3 is such a clusterfuck, it's full of people like Behdad.

  29. Scrollback is for noobs by trev.norris · · Score: 2

    Seriously. Disable scrollback and use screen. You're life will improve.

    1. Re:Scrollback is for noobs by Anonymous Coward · · Score: 0

      I am life has already improved

    2. Re:Scrollback is for noobs by MooMooFarm · · Score: 1

      This was my first thought also: Or just use screen/tmux

  30. If an attacker is reading plaintext off a drive... by DamnStupidElf · · Score: 1

    ..that you once owned, you have a much bigger problem than your scrollback buffer.

    AES-NI makes encryption almost free. There's no reason not to use it.

  31. What about putty? by Anonymous Coward · · Score: 0

    sudo apt-get install putty?

  32. Ever heard of swap? by sjames · · Score: 1

    This is truly a non-issue. If your machine has swap, then ANYTHING in memory can end up on the disk. The data is not exposed in a way that it can be grabbed by other users, you would have to dig through the disk image to find the unlinked file.

    Very simply, if you ever dispose of or sell a hard drive, you MUST wipe it first. If a drive fails and you want to make sure no data gets out when you throw it away, you must destroy the platters.

    SSH has nothing to do with this. It is not and never was a magic faery wand that prevents data disclosure. Once the data gets from remote to local, its job is done.

    1. Re:Ever heard of swap? by M1FCJ · · Score: 1

      Seriously? Who doesn't use encrypted swap these days?

    2. Re:Ever heard of swap? by Anonymous Coward · · Score: 0

      People who don't want to wait for disk *and* decryption?

    3. Re:Ever heard of swap? by formfeed · · Score: 1

      Seriously? Who doesn't use encrypted swap these days?

      People who want hibernate to work.

  33. Re:Yet another reason to switch to KDE permanently by behdad · · Score: 4, Informative

    Anonymous Coward,

    You may want to read the end of this comment before jumping to conclusions:

        https://bugzilla.gnome.org/show_bug.cgi?id=664611#c10

    Ie. I offered to fix it, before the report was published. And the report is deliberately misinformed to make it look like I said I don't have any intention to fix it. And the report author tweetted [1] "Apparently not a lot of people read Slashdot anymore or RTFA. I've only had 971 hits to the article so far. :-(", which makes me believe that his true intention was to get Slashdot / Reddit / Hacker News bragging rights. Comes handy if you are a sysadmin I guess...

    behdad

    [1] https://twitter.com/#!/climagic/status/177796284755873793

  34. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0

    I have read the thread, actually, and I saw your childish non-responses that resulted in this blowing up in the first place. As far as I'm concerned the motivations of the author don't matter, and they shouldn't matter to _YOU_ either. If the bug still exists, and it does, you should be _IGNORING_ his intentions and working on fixing the security vulnerability, not scurrying about on Slashdot trying to defend yourself when you've already proven your position indefensible.

    I'm personally quite glad that I switched to KDE 4.8. It's stable, offers more features than GNOME 3 ever _will_ offer, and best of all, Behdad? It doesn't have people like you working on it, which means that a security vulnerability will be given the attention it's due, not put on the backburner because somebody on the Internet hurt your feelings. Grow the hell up. You've embarrassed yourself enough already, time to either fix your damn code or step aside and let someone more capable do the job.

  35. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0
    No.

    From your link, you offered 3 suggestions as to how you might fix this, then the submitted said that he didn't like the code writing to /tmp at all, and that you should remove the offending code *instead* of any of your suggestions.

    You then threw your toys out of the pram, saying that he should comment on your suggestions (WTF? He did! He doesn't want you to implement any of them!), suggested he should fork VTE(!!!!!), and then behaved like a rude 4 year old for the rest of the thread.

    You even managed to get another user banned, even though his only crime was to descend to *your* level.

    This is a shining example of how open source should *not* work. You should be ashamed of yourself.

  36. VT100 by Zoxed · · Score: 2

    Yet another reason to use a VT100 hooked up to the serial port !

  37. If they had your disk they'd have your private key by Anonymous Coward · · Score: 0

    So if someone had your physical disk, they'd have your SSH private key too that you used to log on to another host and run commands, so wouldn't you have much bigger problems?

  38. I fixed it for you by KeesCook · · Score: 2
    1. Re:I fixed it for you by mdeslaur · · Score: 1

      Nice patch d00d!

  39. Re:Yet another reason to switch to KDE permanently by M1FCJ · · Score: 1

    Although Behdad is behaving irresponsibly, Konsole is also affected hence KDE.

  40. also a vector for local attacks by M1FCJ · · Score: 1

    As a user I hope that the root of the machine cannot see what's on my screen, security, privacy and else, you know, stuff...

    cd /proc/25044/fd
    Check for deleted tmp files.
    lrwx------ 1 hakan hakan 64 2012-03-08 21:32 24 -> /tmp/vteDN7ZAW (deleted)
    lrwx------ 1 hakan hakan 64 2012-03-08 21:32 25 -> /tmp/vteHZ7ZAW (deleted)
    lrwx------ 1 hakan hakan 64 2012-03-08 21:32 26 -> /tmp/vteQZ7ZAW (deleted)

    Let's have a peek, head 25 gives me:

    hakan@photon:21:28:40:~$ find .
    . ./.mplayer ./.mplayer/gui.pl ./.mplayer/gui.history ./.mplayer/gui.conf ./.mplayer/config ./.mplayer/gui.url

    That's exactly what I had typed on my just-installed-about-to-be-uninstalled gnome-term instance.

  41. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0

    Yes, and which do you think will have that bug fixed first, judging by the way Behdad is behaving? Keep in mind he's the one that would actually be _FIXING_ the bug, if it ever gets fixed.

    The ranks of GNOME 3's developers are literally _filled_ with people like him. Best to just drop the entire project and save yourself a lot of trouble as far as I'm concerned. Yes, Konsole is vulnerable now, but unlike Behdad the maintainers responsible for KDE actually care about security issues, they don't let their massive and unsavoury personalities get in the way of work being done. I'd be much more willing to trust my security to their code than anything written by that man-child, or _not_ written to be more precise. His suggestion to the initial reporter? Fork VTE and fix it yourself. Hell, there's a patch in the thread that was contributed by an Ubuntu developer no less and I doubt Behdad will even accept it. He'll probably delete the entire report just out of spite and leave millions of machines vulnerable to satisfy his masturbatory ego.

  42. The sky is blue! The sky is blue! by zenyu · · Score: 1

    This is how you should implement unlimited scrollback, create a tmp file in /tmp and then unlink it so it will be freed on exit.

    /tmp is something a sysadmin should be aware of. All kinds of sensitive data is written there by applications and if the computer might be stolen and contains sensitive information then /tmp and swap (and a few other things) should be encrypted or otherwise secured. But honestly if someone with malicious intent gets physical access to an unencrypted disk I'm sure they wouldn't even bother with this. There are a lot more interesting things to look at than some fragmentary shell history. And if they get root while you are still typing then they have the keys to the kindom, access everything you type and everything you see without bothering with this.

    I'm hoping the VTE guys don't change to a less good implementation just because some idiot is screaming off rooftops, "The sky is blue! The sky is blue!"

    1. Re:The sky is blue! The sky is blue! by Ramin_HAL9001 · · Score: 1

      He is mounting "/dev/sdb1" to "/tmp". Most Linux systems mount the in-memory only "tmpfs" to "/tmp", so data written to it is in memory only. Unless the pages comprising "tmpfs" are swapped to disk, none of this information should ever even touch the hard disk. But the way he set it up, "/dev/sdb1" will capture all terminal data. Why would you even set it up this way to begin with? It's not the default setup.

      This is pretty stupid. Not a security vunerability, just another thing to be careful of -- never mount a physical disk to "/tmp".

    2. Re:The sky is blue! The sky is blue! by suso · · Score: 1

      These claims are actually not true. Results that show otherwise forthcoming.

  43. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0

    Although Behdad is behaving irresponsibly, Konsole is also affected hence KDE.

    Please! Pretty please tell me how Behdad is behaving irresponsibly?

    I'd say EVERY PERSON IN THE WORLD (including YOU!) is behaving MORE irresponsible by not contributing to VTE themselves.......

  44. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0

    Maybe I am an idiot, but what is wrong with limited scroll-back memory?

    At least then people remember the use of scroll-lock. ;-)

  45. GNOME and reality by gottabeme · · Score: 1

    Nope, they rock. When KDE did there big roll-out of KDE4 the lists *EXPLODED* with the wailing and gnashing of teeth. KDE4 arrived stable and that loud minority either adapted or went on the something else. Much the same thing happened with GNOME3 - although less than I expected. I moved to GNOME3 from GNOME2 and within a week it was clear that it was a superior system. But some adaptation was required.

    it's not the same thing. The backlash against KDE4 was because it was released too soon, when it had many bugs and lacked feature parity with KDE3. The backlash against GNOME3 is because it was released at all--because it threw out what has been proven to work in favor of experimental ideas from self-appointed "designers"--because GNOME3, compared to GNOME2, is a developers' and designers' playground. GNOME3 should not have been called GNOME3, because it should not have been intended to replace GNOME2 at this time, if ever.

    And this particular bug is nonsense. Basically: if someone steals your harddrive they can read your data! Really? Wow, that's a surprise. This has always been true, is true of /home, /var. and everything else unless you encrypt everything.

    Why so dense? How'd you feel if you discovered that ffmpeg had been recording a video of your entire screen all the time, without your knowledge, dumping it to /tmp? Yeah, if someone gets your disk they can see what's on it--the point is that these things shouldn't be on the disk in the first place! The screen is a transient, ephemeral medium--to treat it as a semi-permanent medium by recording it to disk is breaking long-established convention, and to do it without announcing it in FLASHING RED LETTERS is to break users' trust. If you go to a web site and then delete your history/cache/etc, you can reasonably expect it to not be seen on your disk, unless someone puts forth a lot of effort looking for something that, from their perspective, might not even exist. But if your whole session is dumped to the disk separately, all someone has to do is look at that file. Even if it's deleted, recovering large chunks of one large file is easier than digging up old parts of a SQLite db and making something out of it.

    Yes, it comes from a vocal minority who don't realize all these changes where discussed and made out-in-the-open. Now they enjoy pitching a fit and claiming the design changes are somehow being forced upon them.

    Hahaha! Yeah, just like Congress! Their sessions are public record, so if they do something we don't like, why should we complain? They were discussed in the open!

    At least we can try to vote better people into office. GNOME, however, consists of self-appointed experts. They abdicate any sense of responsibility to their many users in favor of their own, narrow-minded views. No, they have no legal responsibility to users, but I advocate a higher standard than the bare minimum: they know people depend on their software, so they should not play around willy-nilly with what they release as the standard version. If they want to experiment, fine--call it something else and release it separately!

    I want to work efficiently. GNOME3 lets me do that... more than GNOME2 did. This is an important distinction from, based on mail list traffic, people who apparently *NEED* to see the real-time weather report for three cities in the panel clock in order to be productive. I think the group primarily 'alienated' by GNOME3 are the "tweakers". They have a computer almost for the sole purpose of tweaking the appearance of the user-interface. One reads much of those posts and says "eh? really? don't you have something to *do*.".

    This condescending attitude is exemplary of what GNOME has become. "I don't want or need to do that--why should you? Get a life." I foresee GNOME self-destructing and splitting up into a bunch of forks that will sputter

    --
    "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
  46. Violating established conventions without warning by gottabeme · · Score: 1

    The point is that this data should never have hit the disk in the first place. The screen is expected to be an ephemeral medium--not one recorded to disk automatically. How would you feel if you discovered that ffmpeg was recording your entire screen to /tmp/username.mpg without your knowledge? Sure, clear your browser cache and history and vacuum the dbs--but then all I need to do is find the stream of your desktop session video and play it back, and I'll be able to see most of what you did, even though it was unlinked, unless you also wipe that file byte-by-byte.

    The principle is the same. To do this is a violation of long established conventions, and to do it without warning the user in BIG RED LETTERS is a violation of trust. To then downplay the issue is to dismiss reality.

    Sure, you SSH in to a remote system and expect that data to hit the screen and then disappear into RAM's black hole of power-off-ness. But, oops, it was written to disk, and someone could dig it up?

    The point is not that you could or should encrypt /tmp and swap--the point is that the screen's contents are not expected to hit the disk automatically.

    --
    "Those who consume the bulk of goods are those who make them. We must never forget this secret of our prosperity."
  47. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0

    Yeah, how are we supposed to read it when you've had the bug closed to the public, Behdad? Care to answer that while you're desperately trying to save your reputation on Slashdot of all places? Somehow I doubt it.

    Incidentally, folks, the reason that he closed the bug was that Kees Cook submitted a patch for it in the thread. Now why would Behdad be against a patch, particularly since in the thread that he's now closed to the public he expressed no interest whatsoever in dealing with the bug himself? Because Kees Cook is an Ubuntu developer and Behdad used to work for Redhat. In other words, Behdad's ego is so massive and bloated that he's not even going to let someone _else_ fix the problem, particularly if they're not a Redhat crony.

  48. Re:Yet another reason to switch to KDE permanently by Anonymous Coward · · Score: 0

    How is not responding childish? Maybe he was busy or had more things to do than respond to a bunch of whiny demanding nerds. If you're not paying for support you are entitled to absolutely nothing. Deal with it.

  49. Re:Penguins here on /. turning up b.s. artists? by Anonymous Coward · · Score: 0

    The "mighty mod down" (more like weak wuss tactic) and not disproving what was said? LMAO, you lose, losers.

  50. Re:hell ya open source rules by Anonymous Coward · · Score: 0

    fuck you goddamn windows monkeys. take your stupid asses to a different site that caters to your pussy ass windows machine.