Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I get this message when ending tasks in System Monitor:

Dialog

I understand ending processes will remove data in memory and break its current session, but how can ending a process create a security risk??

share|improve this question

2 Answers 2

It may introduce a risk if the process is not allowed to perform necessary clean-up.

For example, when a text file is edited, the new contents are often stored in /tmp, or even in the current directory, with an obscure filename. This file is simply renamed as the original file when the user saves to disk, or deleted when the user discards the edit.

If the process is not allowed to either rename or delete, there is a security risk if the original file, or the unsaved edits, contain sensitive information, like passwords.

Now extend the analogy to web browsers and session cookies, and you have a formidable security risk.

Edit: As pointed out below, properly coded programs will take due care to ensure that a forced termination does not become a security risk.

However, not all programs are properly coded and the O_TMPFILE mechanism was added in Linux 3.11, so code written prior to the addition will not make use of it. That includes the current LTS, which is stuck on Linux 3.8.

It is best to assume that a program will cause a security risk if forcefully terminated, unless you have had the time to inspect the source yourself.

share|improve this answer
1  
This is why properly behaved apps that need to store things they don't want left around after they exit unlink() the file before writing the data to them, and also why the kernel recently added an O_TMPFILE flag to create such an un-named file atomically so there isn't even a minute window where another program could grab the file. –  psusi Jan 3 at 2:51

It doesn't. It seems someone was a little overzealous in crafting that message.

share|improve this answer
    
I beg to differ. Force-killing some processes will leave backup files which can still cause security issues if there's private data such as passwords and such in the file (usually in /tmp but still a risk). Ankit pointed out such examples of this. –  Thomas W. Jan 1 at 4:54
    
@ThomasW., the security issue is caused by the app storing sensitive information on disk in the first place, not being killed. Whether the file is there for a short or long period of time doesn't really matter; someone can grab it either way. –  psusi Jan 2 at 14:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.