Skip to contentSkip to conversation

The disappearing sys_call_table export.

DISCUSSION Chuck Ebbert 7 participants 15 messages May 13, 2003 – May 15, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

cat >/sbin/swapoff
#!/bin/sh
/sbin/swapoff.real
/sbin/wipeswap
^D
chmod +x /sbin/swapoff

OK...

 # rpm --freshen mount-2.11n-12.rpm

swapoff get silently replaced AFAICT.

#1 lore raw
Quoted 5 lines
 # rpm --freshen mount-2.11n-12.rpm

swapoff get silently replaced AFAICT.

This would also happen with the encrypted swap solution since it replaces swapon.

Wouldn't it happen on upgrades even if you put it all in the kernel, since the stock redhat kernel would have it off by default ? (It will be off by default because most people won't need this feature and it'll have a performance penalty) ?

I guess when you maintain a non-default system you must have some post-upgrade procedure. I know I do.

#2 lore raw
In reply to Chuck Ebbert
Quoted 7 lines · Chuck Ebbert
Quoted 6 lines

cat >/sbin/swapoff
#!/bin/sh
/sbin/swapoff.real
/sbin/wipeswap
^D
chmod +x /sbin/swapoff

Quoted 5 lines

OK...

 # rpm --freshen mount-2.11n-12.rpm

swapoff get silently replaced AFAICT.

Your arguments for swap wiping in the kernel aren't making sense. It's the distribution that must be made secure, not just the kernel. And a secure distribution wouldn't nuke its own version of swapoff.

Of course, as others have already noted, you really want encrypted swap rather than swap wiping at shutdown time.

miket

#3 lore raw
Quoted 3 lines · Mike Touloumtzis

It's the distribution that must be made secure, not just the kernel. And a secure distribution wouldn't nuke its own version of swapoff.

This is not a reply in particular to swapon swapoff issue that preceeded the above, but a general comment about security since there seem to be misconceptions about who should be responsible for it.

Level of security is a matter of trust. Should the kernel trust a distribution provider? No, that is not a reasonable request, because we do not control their environment and evaluation proceedures and there are no guarentees between the channel that provides the operating system to the time it gets installed on a system.

In a secure environment, trusting _any_ user-space application or combination of user-space applications, is a poor approach to security. (I refer you to bind, openssl, sendmail, apache and a gazillion other userspace applications which have exhibited security flaws).

For that matter, trusting the entire kernel also has its flaws (i refer to the silly ptrace bug found not too long ago in the 2.4.x series).

[Sufficient] security is the state where we can fundamentally guard against any deliberate sabotage or unintentional mistakes in the environment.

A reasonable approach to achieving this is to provide a controlled (single!?) point of evaluation because it is far less likely that issues with such a controlled point of evaluation for all security will go unnoticed.

Firewalls are a good example of this. Since we don't trust users on an internal network to be able to create secure environements individually w.r.t. the outside world, we create a single point of evaluation into it through a firewall. Similarly, a good security system will treat anything comming into it as not particularly trustable untless otherwise proven. (Guilty until proven innocent approach works *teehee*)

Cheers,

Ahmed.

#4 lore raw
Quoted 6 lines · Ahmed Masud

Level of security is a matter of trust. Should the kernel trust a distribution provider? No, that is not a reasonable request, because we do not control their environment and evaluation proceedures and there are no guarentees between the channel that provides the operating system to the time it gets installed on a system.

I don't understand why people are willing to base security arguments on some sort of bizarre adversarial relationship between the kernel and the system tools.

No Unix (even a "secure" one) is designed to run all security-critical code in the kernel. That would be a bad design anyway, since it would run lots of code at an unwarranted privilege level. "login" is not part of the kernel. "su" is not part of the kernel". The boot loader is not part of the kernel. And so on.

There is no issue of "trust" between the kernel and the distribution provider. The distribution provider provides a system, which (like all Unix-derived systems) is modular and thus has multiple independent components with security functions. The sum of those parts is what you should evaluate for security. Yes, the system should include proper isolation mechanisms to prevent improper privilege escalations. But it doesn't make sense to even think about what the kernel should do when the untrusted distribution provides a malicious "/sbin/init".

miket

#5 lore raw
Quoted 18 lines · Mike Touloumtzis
Quoted 6 lines · Ahmed Masud

Level of security is a matter of trust. Should the kernel trust a distribution provider? No, that is not a reasonable request, because we do not control their environment and evaluation proceedures and there are no guarentees between the channel that provides the operating system to the time it gets installed on a system.

I don't understand why people are willing to base security arguments on some sort of bizarre adversarial relationship between the kernel and the system tools.

No Unix (even a "secure" one) is designed to run all security-critical code in the kernel. That would be a bad design anyway, since it would run lots of code at an unwarranted privilege level. "login" is not part of the kernel. "su" is not part of the kernel". The boot loader is not part of the kernel. And so on.

Quoted 8 lines

There is no issue of "trust" between the kernel and the distribution provider. The distribution provider provides a system, which (like all Unix-derived systems) is modular and thus has multiple independent components with security functions. The sum of those parts is what you should evaluate for security. Yes, the system should include proper isolation mechanisms to prevent improper privilege escalations. But it doesn't make sense to even think about what the kernel should do when the untrusted distribution provides a malicious "/sbin/init".

Not even malicious. For years, it was accepted that if you had physical possesion of a computing system, you could do anything with it that it was capable of.

Not so, with the latest Red Hat distribution (9). You can no longer set init=/bin/bash at the boot prompt.... well you can set it, but then you get an error about killing init. This caused a neighbor a lot of trouble when she accidentally put a blank line in the top of /etc/passwd. Nobody could log-in. I promised to show her how to "break in", but I wasn't able to. I had to take her hard-disk to my house, mount it, and fix the password file. All these "attempts" at so-called security do is make customers pissed.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.

#6 lore raw
Quoted 9 lines

Not so, with the latest Red Hat distribution (9). You can no longer set init=/bin/bash at the boot prompt.... well you can set it, but then you get an error about killing init. This caused a neighbor a lot of trouble when she accidentally put a blank line in the top of /etc/passwd. Nobody could log-in. I promised to show her how to "break in", but I wasn't able to. I had to take her hard-disk to my house, mount it, and fix the password file. All these "attempts" at so-called security do is make customers pissed.

1. Insert Live-System CD (Knoppix for example)
2. Boot from it.
3. Mount rootfs.
4. Fix things.
5. Remove CD and reboot.

#7 lore raw
Quoted 10 lines · Yoav Weiss
Quoted 9 lines

Not so, with the latest Red Hat distribution (9). You can no longer set init=/bin/bash at the boot prompt.... well you can set it, but then you get an error about killing init. This caused a neighbor a lot of trouble when she accidentally put a blank line in the top of /etc/passwd. Nobody could log-in. I promised to show her how to "break in", but I wasn't able to. I had to take her hard-disk to my house, mount it, and fix the password file. All these "attempts" at so-called security do is make customers pissed.

Quoted 6 lines

1. Insert Live-System CD (Knoppix for example)
2. Boot from it.
3. Mount rootfs.
4. Fix things.
5. Remove CD and reboot.

Not so easy. Many persons have drivers that must be installed using initrd (SCSI, Firewire, etc.) before their root file-systems are accessible.

This means that there isn't a general-purpose tool that you can take with you (except another PC, you can use to mount the locked disk). NotGood(tm). Sun allows their install CD/ROM to be used for repair. Other vendors did this also. New "security" out of Red-Hat seems to prevent this, ALF-F2, etc., used to bring up other virtual terminals. They don't anymore. I think every OS vendor should be required to spend a few weeks in the field, preferably in Afghanistan <grin>, before they even consider mucking with accepted principles.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.

#8 lore raw
In reply to Richard B. Johnson
Quoted 31 lines · Richard B. Johnson
Quoted 17 lines · Mike Touloumtzis
Quoted 5 lines · Ahmed Masud

Level of security is a matter of trust. Should the kernel trust a distribution provider? No, that is not a reasonable request, because we do not control their environment and evaluation proceedures and there are no guarentees between the channel that provides the operating system to the time it gets installed on a system.

I don't understand why people are willing to base security arguments on some sort of bizarre adversarial relationship between the kernel and the system tools.

No Unix (even a "secure" one) is designed to run all security-critical code in the kernel. That would be a bad design anyway, since it would run lots of code at an unwarranted privilege level. "login" is not part of the kernel. "su" is not part of the kernel". The boot loader is not part of the kernel. And so on.

Quoted 8 lines

There is no issue of "trust" between the kernel and the distribution provider. The distribution provider provides a system, which (like all Unix-derived systems) is modular and thus has multiple independent components with security functions. The sum of those parts is what you should evaluate for security. Yes, the system should include proper isolation mechanisms to prevent improper privilege escalations. But it doesn't make sense to even think about what the kernel should do when the untrusted distribution provides a malicious "/sbin/init".

Not even malicious. For years, it was accepted that if you had physical possesion of a computing system, you could do anything with it that it was capable of.

Quoted 8 lines

Not so, with the latest Red Hat distribution (9). You can no longer set init=/bin/bash at the boot prompt.... well you can set it, but then you get an error about killing init. This caused a neighbor a lot of trouble when she accidentally put a blank line in the top of /etc/passwd. Nobody could log-in. I promised to show her how to "break in", but I wasn't able to. I had to take her hard-disk to my house, mount it, and fix the password file. All these "attempts" at so-called security do is make customers pissed.

I fix those errors with by booting the Slackware CD with the live filesystem...

No dependancies on any of the regular disks - then I can fix anything within reason (haven't tried md raids though).

#9 lore raw
Quoted 10 lines · Jesse Pollard
Quoted 8 lines · Richard B. Johnson

Not so, with the latest Red Hat distribution (9). You can no longer set init=/bin/bash at the boot prompt.... well you can set it, but then you get an error about killing init. This caused a neighbor a lot of trouble when she accidentally put a blank line in the top of /etc/passwd. Nobody could log-in. I promised to show her how to "break in", but I wasn't able to. I had to take her hard-disk to my house, mount it, and fix the password file. All these "attempts" at so-called security do is make customers pissed.

Quoted 5 lines

I fix those errors with by booting the Slackware CD with the live filesystem...

No dependancies on any of the regular disks - then I can fix anything within reason (haven't tried md raids though).

You don't have to do that. Richard is mis-informed. Any of the following still work on Red Hat Linux 9:

init=/bin/bash         # drops you straight to a bash shell
init 1                 # runs runlevel 1 SysV init scripts and rc.sysinit
init single            # runs rc.sysinit, but not runlevel 1
init emergency         # runs a shell

all without going to rescue media.

later,
chris

#10 lore raw
Quoted 21 lines · Chris Ricker
Quoted 10 lines · Jesse Pollard
Quoted 8 lines · Richard B. Johnson

Not so, with the latest Red Hat distribution (9). You can no longer set init=/bin/bash at the boot prompt.... well you can set it, but then you get an error about killing init. This caused a neighbor a lot of trouble when she accidentally put a blank line in the top of /etc/passwd. Nobody could log-in. I promised to show her how to "break in", but I wasn't able to. I had to take her hard-disk to my house, mount it, and fix the password file. All these "attempts" at so-called security do is make customers pissed.

Quoted 5 lines

I fix those errors with by booting the Slackware CD with the live filesystem...

No dependancies on any of the regular disks - then I can fix anything within reason (haven't tried md raids though).

You don't have to do that. Richard is mis-informed. Any of the following still work on Red Hat Linux 9:

Quoted 7 lines
init=/bin/bash         # drops you straight to a bash shell
init 1                 # runs runlevel 1 SysV init scripts and rc.sysinit
init single            # runs rc.sysinit, but not runlevel 1
init emergency         # runs a shell

all without going to rescue media.

Bullshit. Try it. So called Linux 9 /Professional did **NOT** allow anybody to break in. Maybe you didn't try it, or maybe it wasn't tested in a machine that uses initrd to make the hard disk accessible, but it absolutely positively fails to run any 'init' when the LILO boot is interrupted and we entered, in addition to the linux OS label, the parameter init=/bin/bash. We even tried, probably nearly a hundred boots, over two days various things like init=/bin/csh.... various possible shells, plus init=/sbin/init 1, etc. Any time 'init' was defined on the boot command-line, the machine would panic with 'attempting to kill init'.

Also, when booting on the distribution media, the ALF-F2...F5 keys no longer function so you can't access a shell. Try it before you claim I'm "mis-informed". I wasted an entire weekend until I took the damn hard disk out, brought it home, and "fixed" it.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.

#11 lore raw
Quoted 8 lines · Richard B. Johnson
Quoted 8 lines

You don't have to do that. Richard is mis-informed. Any of the following still work on Red Hat Linux 9:

init=/bin/bash         # drops you straight to a bash shell
init 1                 # runs runlevel 1 SysV init scripts and rc.sysinit
init single            # runs rc.sysinit, but not runlevel 1
init emergency         # runs a shell
Quoted 4 lines
Quoted 2 lines

all without going to rescue media.

Bullshit. Try it.

I just did. It works.

If it's not working for you, it's because *you* did something (like, say, password your boot loader). By default, it's still possible on Red Hat Linux 9 out of the box.

later,
chris

#12 lore raw
Quoted 17 lines · Chris Ricker
Quoted 8 lines · Richard B. Johnson
Quoted 8 lines

You don't have to do that. Richard is mis-informed. Any of the following still work on Red Hat Linux 9:

init=/bin/bash         # drops you straight to a bash shell
init 1                 # runs runlevel 1 SysV init scripts and rc.sysinit
init single            # runs rc.sysinit, but not runlevel 1
init emergency         # runs a shell
Quoted 4 lines
Quoted 2 lines

all without going to rescue media.

Bullshit. Try it.

I just did. It works.

Quoted 7 lines

If it's not working for you, it's because *you* did something (like, say, password your boot loader). By default, it's still possible on Red Hat Linux 9 out of the box.

later,
chris
-

Sill bullshit. I did nothing except to try to help a neighbor who got locked out of her machine. I spent most of Saturday and all of Sunday trying to break in. The LILO command prompt readily took "parameters". However, any parameter passed on the command-line resulted in a try-to-kill init error. Her machine uses an Adaptec SCSI controller which needs to be loaded via initrd to make the root file-system available.

I tried Red-Hat 8.0 here at work. It works as you described. There is no problem with it and LILO and initrd. However Red Hat 9/Professional does not allow break-in, at least on the machine tested...and I have several pissed off witnesses.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips). Why is the government concerned about the lunatic fringe? Think about it.

#13 lore raw
Quoted 24 lines · Richard B. Johnson
Quoted 5 lines · Chris Ricker
Quoted 3 lines · Richard B. Johnson
Quoted 3 lines

You don't have to do that. Richard is mis-informed. Any of the following still work on Red Hat Linux 9:

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
init=/bin/bash         # drops you straight to a bash shell
init 1                 # runs runlevel 1 SysV init scripts and rc.sysinit
init single            # runs rc.sysinit, but not runlevel 1
init emergency         # runs a shell

all without going to rescue media.

Sill bullshit. I did nothing except to try to help a neighbor who got locked out of her machine. I spent most of Saturday and all of Sunday trying to break in. The LILO command prompt readily took "parameters". However, any parameter passed on the command-line resulted in a try-to-kill init error. Her machine uses an Adaptec SCSI controller which needs to be loaded via initrd to make the root file-system available.

Quoted 5 lines

I tried Red-Hat 8.0 here at work. It works as you described. There is no problem with it and LILO and initrd. However Red Hat 9/Professional does not allow break-in, at least on the machine tested...and I have several pissed off witnesses.

This is an issue directly to be taken up with the manufacturer and is a bit off topic here. RedHat 9 professional can conceivably disallow parameter passing. The fact that a system does not, out of the box, allow for break-ins is a good thing(tm) for most part... manually editing password files is a bad thing(tm), this is why command line tools such as useradd are provided.

Any how, I hope you got it all fixed.

Cheers,

Ahmed.

#14 lore raw
In reply to Mike Touloumtzis
Quoted 9 lines · Mike Touloumtzis
Quoted 1 line · Ahmed Masud

I don't understand why people are willing to base security arguments

Quoted 5 lines

Level of security is a matter of trust. Should the kernel trust a distribution provider? No, that is not a reasonable request, because we do not control their environment and evaluation proceedures and there are no guarentees between the channel that provides the operating system to the time it gets installed on a system.

Quoted 8 lines

on some sort of bizarre adversarial relationship between the kernel and the system tools.

No Unix (even a "secure" one) is designed to run all security-critical code in the kernel. That would be a bad design anyway, since it would run lots of code at an unwarranted privilege level. "login" is not part of the kernel. "su" is not part of the kernel". The boot loader is not part of the kernel. And so on.

There no relationship in what I had said above and what you are saying here. When i state that you cannot trust the operating environment user-space applications, i exactly mean that. It has nothing to do with running su or login as part of the kernel. On the contrary, I am even actually saying they shouldn't even run with full root privileges on a system? (ref. Linux capabilities interface).

Quoted 4 lines

There is no issue of "trust" between the kernel and the distribution provider. The distribution provider provides a system, which (like all Unix-derived systems) is modular and thus has multiple independent

Well ofcourse there is a degree of trust as soon as you accept a particular vendor's distribution. What i am suggesting is a mechanism to throttle that trust as per the sensitivity of application, and the one place you can do that effectively is the kernel.

Quoted 5 lines

components with security functions. The sum of those parts is what you should evaluate for security. Yes, the system should include proper isolation mechanisms to prevent improper privilege escalations. But it doesn't make sense to even think about what the kernel should do when the untrusted distribution provides a malicious "/sbin/init".

We don't want to just deal with "improper" escalations, rather we want to deal with realtime decisions on what may be the "proper" escalation or deescalation along the timeline of running system.

Not sure if what i am attempting to say is clear from above, but i am not suggesting about moving any thing from userspace into kernel space. I am just suggesting that the kernel should provide non binary throttling of the level of trust that may be placed in various components that interact with it.

Ahmed.