发布日期:2009-11-30
更新日期:2009-12-02受影响系统:
Linux kernel 2.6.31.5
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 37147Linux Kernel是开放源码操作系统Linux所使用的内核。Linux Kernel所使用的drivers/char/n_tty.c驱动中存在空指针引用漏洞:/**
* n_tty_close - close the ldisc for this tty
* @tty: device
*
* Called from the terminal layer when this line discipline is
* being shut down, either because of a close or becSUSE of a
* discipline change. The function will not be called while other
* ldisc methods are in progress.
*/static void n_tty_close(struct tty_struct *tty)
{
n_tty_flush_buffer(tty);
if (tty->read_buf) {
kfree(tty->read_buf);
tty->read_buf = NULL;
}
if (tty->echo_buf) {
kfree(tty->echo_buf);
tty->echo_buf = NULL;
}
}这个例程的参数是以指向tty_struct结构的指针形式传送的TTY,首先调用n_tty_flush_buffer()然后释放所分配的read_buf和echo_buf缓冲区,并将其设置为NULL。在这里所调用的第一个函数为:/**
* n_tty_flush_buffer - clean input queue
* @tty: terminal device
*
* Flush the input buffer. Called when the line discipline is
* being closed, when the tty layer wants the buffer flushed (eg
* at hangup) or when the N_TTY line discipline internally has to
* clean the pending queue (for example some signals).
*
* Locking: ctrl_lock, read_lock.
*/static void n_tty_flush_buffer(struct tty_struct *tty)
{
unsigned long flags;
/* clear everything and unthrottle the driver */
reset_buffer_flags(tty); if (!tty->link)
return; spin_lock_irqsave(&tty->ctrl_lock, flags);
if (tty->link->packet) {
tty->ctrl_status |= TIOCPKT_FLUSHREAD;
wake_up_interruptible(&tty->link->read_wait);
}
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
}上面所保持的唯一一个锁是n_tty_flush_buffer()中的自旋锁。由于这个过程中没有其他的锁,这可能导致竞争条件。
使用BackTrack检查Linux安全漏洞Java漏洞刚被补上 攻击代码随后就到相关资讯 Linux Kernel Linux漏洞
- Linux Kernel 3.14系列结束支持 (今 14:24)
- Linux kernel 2.6.32 LTS 将于下个 (01月31日)
- Linux Kernel 4.1.15发布 (12/15/2015 20:54:13)
| - Linux Kernel 开发报告 25 周年版 (09月10日)
- 敲击28次退格键之后:Linux漏洞可 (12/18/2015 11:22:28)
- Red Hat Linux 修补“libuser”库 (07/26/2015 06:39:34)
|
本文评论 查看全部评论 (0)