From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D002C139084 for ; Fri, 16 Dec 2016 19:16:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56A3BE0C46; Fri, 16 Dec 2016 19:16:29 +0000 (UTC) Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E4C2AE0C1E for ; Fri, 16 Dec 2016 19:16:28 +0000 (UTC) Received: by mail-qk0-x244.google.com with SMTP id t184so4237323qkd.1 for ; Fri, 16 Dec 2016 11:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=HLmRm+UjQMUa/blFTC+JYEMyJJ04s7d1u59PZHjRpoA=; b=WuNtmo34vEZ481rHRQGyrE4516TWrhZPMmIjNXhsAG2WnYV3i+Zh2I44KAyCq0Ay7M CuaPdfi4wOfjjaWcWhygBBXRLWOMyGS0uABGgcq0bs4b1/ZPd2VV6yCBiIxboTMbb/KV EP9L4XLflJhTUL+TKkCZG7WGMnnB2V83DqbnlrJaEZkZJhqW48QtZlMjXGuy4+E4JJGN IhydIeHZ3VNpZjmySGcnIwDhE0XAA1brZbB1W2pDYneWJGVhUnkge+F3AicEKMmzZIj9 oALzI6qJujUw3garmiQsHTBDIuOZrfC0ACFB0PeV1lIXV22m+uC3mhA9FFIBEiBGZPsv DHrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=HLmRm+UjQMUa/blFTC+JYEMyJJ04s7d1u59PZHjRpoA=; b=pfz4NSRu+1XchRMJeAI8HUQHITrnX4K//R/a/K9T95WKeL3vkhNwpaFQoWmU/58f/B iFL36zAig/4wBIdn6miQla2tvb7GPNWF0c6l1yoccVQk8H7+vvzrgWYp30tVALHPxi0+ oLxVJXleB0996yob5ie9AVMA0X0uJ/EZXe1ru4r0phAf1lOGd/RKDK+pEqomyQgvanKr 5DFMqvOPuEUopSaGMgnXE8sq6Tn6+vpf3UmBSAFa5z0bopiNzHSvGJNFYgzy4gku632j csJgI4fPDsmb024qGB6a0s3Q1SZnNDvCqQQC2iK6NsNZ11opbjwuQhC3mPJe4NFqsvcx AesA== X-Gm-Message-State: AIkVDXJVnRVsysEhIVRgJVGv/cm76fYnQN6JFQEDkIbWEkX7V+bEfRsz0hJtoi6wDMRlz0YJ8fQnHoZe/iv5ow== X-Received: by 10.55.42.130 with SMTP id q2mr4555046qkq.164.1481915787778; Fri, 16 Dec 2016 11:16:27 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Sender: freemanrich@gmail.com Received: by 10.140.34.73 with HTTP; Fri, 16 Dec 2016 11:16:27 -0800 (PST) In-Reply-To: <20161216165118.GA26704@g0n.xdwgrp> References: <20161015182743.GB4541@solfire> <20161216101951.GA29887@g0n.xdwgrp> <20161216131315.GA4052@g0n.xdwgrp> <20161216165118.GA26704@g0n.xdwgrp> From: Rich Freeman Date: Fri, 16 Dec 2016 14:16:27 -0500 X-Google-Sender-Auth: EYiAfqXNXDVWAocVVwHwAlqf8Fg Message-ID: Subject: Re: [gentoo-user] from Firefox52: NO pure ALSA?, WAS: Firefox 49.0 & Youtube... Audio: No To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 791ab303-a1a0-4804-9948-ff830230afbf X-Archives-Hash: ebc796e801c1fd30d380e3b2023f7d1f On Fri, Dec 16, 2016 at 11:51 AM, Miroslav Rovis wrote: > On 161216-08:35-0500, Rich Freeman wrote: >> >> I'm not sure I understand what distinction you're making. I can't say >> I'm intimately familiar with the security model around Pulseaudio (at >> a glance it seems similar to X11 with its use of cookies, though >> obviously if you tell it to broadcast unencrypted multicast RTP on >> your LAN you'll get the obvious effects) but X11 has a couple of >> glaring security weaknesses. The most obvious is the fact that any >> random X11 client can read the keyboard input of any other client on >> the same server unless you jump through a bunch of hoops that I don't >> think anybody actually jumps through (though I do believe some of the >> X11 PIN entry programs may use them at least). Anything you type into >> an xterm could be read by your browser, and in turn by any code able >> to execute outside any sandbox that browser might have (root privs not >> needed for this). > > I don't claim it can not, but I doubt anyone can do it in my > grsecurity-hardened based Gentoo machine. As far as I'm aware grsecurity provides no protection against X11 client evesdropping. This is an X11 "feature" and not an exploit per-se. Here is one overview of the possibilities: https://pipefish.me/2012/08/28/spying-on-screens-and-keystrokes-the-dangers-of-open-x11/ Any program that has access to your X11 cookie and which can connect to your X server (which includes anything actually displaying a window on your screen), can generally grab any of the keyboard input bound for any window on your screen. There are ways for programs to block this, but they're not super-practical. Amusingly enough I stumbled upon this blog: https://blog.separateconcerns.com/2014-10-24-cli-passwords.html This page "helpfully" suggests that you can secure your system by using a console pinentry program instead of an X11-based one, with the underlying assumption being that console software is more secure for this sort of thing. While the basic assumption is probably true, in this particular case it is definitely not. Entering a password on an actual virtual console or over ssh is in fact secure. However, entering it into an xterm (which is presumably what you're using if you would otherwise be using an x11 pinentry program) is absolutely not secure. The x11 pinentry program probably uses XGrabKeyboard to ensure that other clients can't evesdrop, while the console-based version doesn't know anything about x11. Some xterm implementations have a secure mode buried in the menus which turns on this mode which you can use to safely enter passwords, but almost nobody knows about this. There are a lot of "cargo cult" tips out there which are based on a lack of understanding of how software like X11 actually work. Of course, X11 is so convoluted that almost nobody actually understands everything about how it works, which is why Wayland has always been right around the corner. In general, though, it largely dates back to an era where people had rsh listening on all their hosts. > >> And I wouldn't be surprised if a lot of X servers still run as root >> for modesetting/etc. > > What user is that? It you want, tell me how to check it, and let's see > how spyware-prone my system is. If you don't have USE=-suid on your xorg-server package, then X is probably running suid root. In order to not have it run this way you need support for kernel modesetting. I was surprised when I found out that X11 even worked that way (we're talking late 90s here). It seems a bit like running pppd as root so that it can directly talk to a UART because you have an aversion to using /dev/ttyS*. In any case the kernel devs have generally been making the move to kernel modesetting so that your device drivers actually are in the kernel and not in random userspace programs (I'm all for microkernels, but not like this). If you don't have kernel modesetting enabled then X11 won't be able to run with -suid set. Google for gentoo kernel modesetting for a guide on how to enable it on most modern hardware. > > It's been discussed over and over again. Lots of people are firm in > their understanding that Lennart is an actor by and for the big > business. Me too. Well, he is a Red Hat employee. Nobody really debates that. > > Whatever would anybody try to claim Pulseaudio code is, but to make up > for what was missing in some FOSS GNU Linux boxen for the missing > functionality that the big players couldn't otherwise get for their > Total Surveillance... > Uh, if the NSA wanted to spy on your box I doubt they'd do it by trying to sneak something into the open-source pulseaudio code that has numerous maintainers and which is copied all over the place. They'd probably just load some microcode into your audio hardware, and have it talk to some microcode in your NIC hardware, and if they needed some buffer they'd work it into your hard drive firmware. Then it works no matter what OS you're using at the moment, or even if you boot off of a DVD. And if they did want to do it more traditionally in userspace, they'd hardly be foiled because you aren't running Pulseaudio. They'd just modify your ALSA drivers or run a program that simply opens your microphone and sends the audio to some remote host. In the end whether software works for you or against you largely depends on how well you understand how it all works. Don't get me wrong, there are lots of good reasons not to use Pulseaudio. I probably wouldn't run it on a server, unless it was something like a home music server. However, on a traditional desktop it is generally useful because it enables all kinds of sticky stuff that historically has been difficult, and which seem like the sort of things that should be easy. Most people would expect to be able to plug a USB headset into a laptop and have it "just work." Older approaches like ALSA were designed for a more static world. It isn't unlike CUPS. Sure, if all you need is to occasionally print to a postfix printer on a serial/parallel port then you don't really need it. However, for just about everything else it helps quite a bit. Software usually gets written and becomes popular because it scratches some kind of itch. If there is software that you don't care for, I suggest learning how it works anyway. Knowledge is power. Besides, you never know when you'll need to evesdrop on somebody in an emergency... :) -- Rich