linux/drivers
Miloslav Trmac 522ed7767e Audit: add TTY input auditing
Add TTY input auditing, used to audit system administrator's actions.  This is
required by various security standards such as DCID 6/3 and PCI to provide
non-repudiation of administrator's actions and to allow a review of past
actions if the administrator seems to overstep their duties or if the system
becomes misconfigured for unknown reasons.  These requirements do not make it
necessary to audit TTY output as well.

Compared to an user-space keylogger, this approach records TTY input using the
audit subsystem, correlated with other audit events, and it is completely
transparent to the user-space application (e.g.  the console ioctls still
work).

TTY input auditing works on a higher level than auditing all system calls
within the session, which would produce an overwhelming amount of mostly
useless audit events.

Add an "audit_tty" attribute, inherited across fork ().  Data read from TTYs
by process with the attribute is sent to the audit subsystem by the kernel.
The audit netlink interface is extended to allow modifying the audit_tty
attribute, and to allow sending explanatory audit events from user-space (for
example, a shell might send an event containing the final command, after the
interactive command-line editing and history expansion is performed, which
might be difficult to decipher from the TTY input alone).

Because the "audit_tty" attribute is inherited across fork (), it would be set
e.g.  for sshd restarted within an audited session.  To prevent this, the
audit_tty attribute is cleared when a process with no open TTY file
descriptors (e.g.  after daemon startup) opens a TTY.

See https://www.redhat.com/archives/linux-audit/2007-June/msg00000.html for a
more detailed rationale document for an older version of this patch.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Miloslav Trmac <mitr@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:47 -07:00
..
acorn [PATCH] fix request->cmd == INT cases 2007-07-10 08:03:34 +02:00
acpi PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
amba
ata Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
atm Introduce CONFIG_VIRT_TO_BUS 2007-07-16 09:05:42 -07:00
auxdisplay Use menuconfig objects II - auxdisplay 2007-07-16 09:05:40 -07:00
base sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
block Introduce CONFIG_VIRT_TO_BUS 2007-07-16 09:05:42 -07:00
bluetooth [Bluetooth] Remove the redundant non-seekable llseek method 2007-07-11 06:53:45 +02:00
cdrom Remove legacy CDROM drivers 2007-07-10 08:03:34 +02:00
char Audit: add TTY input auditing 2007-07-16 09:05:47 -07:00
clocksource PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
connector Use menuconfig objects: connector 2007-07-16 09:05:40 -07:00
cpufreq [CPUFREQ] Restore previously used governor on a hot-replugged CPU 2007-07-13 01:29:51 -04:00
crypto Use menuconfig objects: crypto hw 2007-07-16 09:05:40 -07:00
dio
dma dma-mapping: prevent dma dependent code from linking on !HAS_DMA archs 2007-07-16 09:05:45 -07:00
edac Use menuconfig objects II - EDAC 2007-07-16 09:05:40 -07:00
eisa
fc4
firewire firewire: fw-sbp2: fix DMA mapping of management ORBs 2007-07-10 00:07:49 +02:00
firmware edd: switch to pci_get based API 2007-07-16 09:05:42 -07:00
hid USB: add reset_resume method 2007-07-12 16:34:30 -07:00
hwmon hwmon/coretemp: fix a broken error path 2007-06-24 08:59:10 -07:00
i2c make i2c-acorn tristate 2007-07-15 16:40:52 -07:00
ide icside: devm_iounmap() needs linux/io.h 2007-07-15 16:40:52 -07:00
ieee1394 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-07-15 16:51:54 -07:00
infiniband Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-07-15 16:51:54 -07:00
input sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
isdn PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
kvm
leds
macintosh Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-07-12 13:40:20 -07:00
mca
md Merge branch 'ioat-md-accel-for-linus' of git://lost.foo-projects.org/~dwillia2/git/iop 2007-07-13 10:52:27 -07:00
media PCI: Change all drivers to use pci_device->revision 2007-07-11 16:02:10 -07:00
message Introduce CONFIG_VIRT_TO_BUS 2007-07-16 09:05:42 -07:00
mfd SM501: Check SM501 ID register on initialisation 2007-06-24 08:59:11 -07:00
misc sony-laptop: use NULL for pointer 2007-07-16 09:05:46 -07:00
mmc Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm 2007-07-12 14:17:12 -07:00
mtd [MIPS] remove LASAT Networks platforms support 2007-07-10 17:33:04 +01:00
net Introduce CONFIG_VIRT_TO_BUS 2007-07-16 09:05:42 -07:00
nubus
oprofile
parisc sysfs: kill unnecessary attribute->owner 2007-07-11 16:09:06 -07:00
parport Use menuconfig objects: parport 2007-07-16 09:05:40 -07:00
pci Remove capability.h from mm.h 2007-07-16 09:05:45 -07:00
pcmcia sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
pnp Use menuconfig objects: PNP 2007-07-16 09:05:40 -07:00
power Merge git://git.infradead.org/battery-2.6 2007-07-15 16:56:12 -07:00
ps3
rapidio sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
rtc Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6 2007-07-12 13:40:20 -07:00
s390 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2007-07-15 16:51:54 -07:00
sbus
scsi Introduce CONFIG_VIRT_TO_BUS 2007-07-16 09:05:42 -07:00
serial atmel_serial: fix break handling 2007-07-16 09:05:45 -07:00
sh
sn
spi sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
tc [MIPS] DEC: Fix modpost warning. 2007-07-12 17:41:07 +01:00
telephony Use menuconfig objects II - Telephony 2007-07-16 09:05:40 -07:00
usb minimal fixes for drivers/usb/gadget/m66592-udc.c 2007-07-15 16:40:51 -07:00
video Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6 2007-07-12 13:40:57 -07:00
w1 Use menuconfig objects: W1 2007-07-16 09:05:40 -07:00
zorro sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes 2007-07-11 16:09:09 -07:00
Kconfig Merge git://git.infradead.org/~dwmw2/battery-2.6 2007-07-10 14:47:59 -07:00
Makefile [BATTERY] Universal power supply class (was: battery class) 2007-07-10 11:25:44 +01:00