lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1160830509.5732.26.camel@localhost.localdomain>
Date:	Sat, 14 Oct 2006 13:55:09 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Prarit Bhargava <prarit@...hat.com>
Cc:	linux-kernel@...r.kernel.org, akpm@...l.org
Subject: Re: [PATCH]: disassociate tty locking fixups

Ar Sad, 2006-10-14 am 07:22 -0400, ysgrifennodd Prarit Bhargava:
> Additional tty_mutex locking in do_tty_hangup and disassociate_ctty.  It is
> possible that do_tty_hangup sets current->signal->tty = NULL.  If that
> happens then disassociate_ctty can corrupt memory.

Ugly but I don't think the patches are sufficient. Firstly you need to
hold the task lock if you are poking around some other users ->signal,
or that may itself change. (disassociate_ctty seems to have this wrong)

Secondly you appear to have lock ordering issues (you lock tty_mutex in
both orders relative to the task list lock) (you take tty_mutex first,
then the task lock which is correct, but then you drop and retake the
tty_mutex while holding the task lock, which may deadlock)

Can you also explain why the ctty change proposed is neccessary ?

NAK the actual code, provisionally agree with the basic diagnosis of
insufficient locking.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ