Re: unsafe printk

From: Pavel Machek (pavel_at_ucw.cz)
Date: 10/17/03

  • Next message: Admin: "Attention all School Staff, Personnel, and Students"
    Date:	Fri, 17 Oct 2003 11:52:41 +0200
    To: Albert Cahalan <albert@users.sf.net>
    
    

    Hi!

    > Suppose I name an executable this:
    > "\n<0>Oops: EIP=0"
    >
    > That comes out as a KERN_EMERG log message,
    > hitting the console and maybe a pager even.
    >
    > There seem to be a number of places in the
    > kernel that printk current->comm without
    > concern for what it may contain.
    >
    > Escape codes and non-ASCII can make for some
    > interesting log messages as well. Terminals
    > may have some programmable keys or answerback
    > messages. So one day root is using grep on
    > the log files, and they program the answerback
    > string to contain a "\r\nrm -r /\r\n"...

    Or at least you can make his terminal pink ;-). Unfortunately same
    problem is with userland programs; root does ps and his terminal goes
    pink. Sanitizing kernel messages would be good start, but ps&friends
    and ls&friends need to be sanitized, too.
                                                                    Pavel

    -- 
    When do you have a heart between your knees?
    [Johanka's followup: and *two* hearts?]
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Admin: "Attention all School Staff, Personnel, and Students"

    Relevant Pages

    • Re: dma ripping
      ... but when I get the log message "cdrom: ... It still rips but ... I get silence - it will rip the track OK, as in read through the correct ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Sony DSC-F505V USB broken in linux-2.6.0
      ... kernel: SCSI device sda: 126848 512-byte hdwr sectors ... What is missing in 2.6.0 is the 2.4.21 log message: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [ltp] Re: ACPI Hibernate and Suspend Strange behavior 2.6.7/-mm1
      ... > I wonder why the system has got such a high affinity to IRQ 11. ... The BIOS default setting is to have all PCI interrupts on 11. ... here's a log message from the system when it tries to come ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: psmouse synchronization loss under load
      ... trackpoint) jumps around and clicks wildly on the desktop.... ... The log message is identical. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)