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: <4A2EB9A4.4040403@gmail.com>
Date:	Tue, 09 Jun 2009 21:36:04 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
CC:	alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org,
	eibach@...ys.de
Subject: Re: [PATCH 1/1] Char: moxa, prevent opening unavailable ports

On 06/09/2009 09:27 PM, Andrew Morton wrote:
> btw, what's this code in moxa_open() doing?
> 
> 	if (port == MAX_PORTS) {
> 		return capable(CAP_SYS_ADMIN) ? 0 : -EPERM;
> 	}
> 
> why does it return 0 if CAP_SYS_ADMIN?				

There is some global stats ioctl crap on that port number available only
to users with permissions. Look at moxa_ioctl, there is:

        if (tty->index == MAX_PORTS) {
                if (cmd != MOXA_GETDATACOUNT && cmd != MOXA_GET_IOQUEUE &&
                                cmd != MOXA_GETMSTATUS)
                        return -EINVAL;

Of course, there is also alloc_tty_driver(MAX_PORTS + 1).
--
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