<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>codeblog</title>
	<atom:link href="http://www.outflux.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.outflux.net/blog</link>
	<description>code is freedom -- patching my itch</description>
	<lastBuildDate>Thu, 11 Mar 2010 06:49:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>openssl client does not check commonName</title>
		<link>http://www.outflux.net/blog/archives/2010/03/10/openssl-client-does-not-check-commonname/</link>
		<comments>http://www.outflux.net/blog/archives/2010/03/10/openssl-client-does-not-check-commonname/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 06:47:58 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=330</guid>
		<description><![CDATA[I realize the openssl s_client tool tries to be upper-layer protocol agnostic, but doesn&#8217;t everything that uses SSL do commonName checking (HTTP, SMTP, IMAP, FTP, POP, XMPP)?  Shouldn&#8217;t this be something openssl s_client does by default, maybe with an option to turn it off for less common situations?
Here it doesn&#8217;t complain about connecting to [...]]]></description>
			<content:encoded><![CDATA[<p>I realize the <code>openssl s_client</code> tool tries to be upper-layer protocol agnostic, but doesn&#8217;t everything that uses SSL do commonName checking (HTTP, SMTP, IMAP, FTP, POP, XMPP)?  Shouldn&#8217;t this be something <code>openssl s_client</code> does by default, maybe with an option to turn it off for less common situations?</p>
<p>Here it doesn&#8217;t complain about connecting to &#8220;outflux.net&#8221; when the cert has a CN for &#8220;www.outflux.net&#8221;:</p>
<pre class="brush:shell">echo QUIT | openssl s_client -CApath /etc/ssl/certs \
  -connect outflux.net:443 2>/dev/null | egrep "subject=|Verify"
</pre>
<pre class="brush:text">
subject=/CN=www.outflux.net
    Verify return code: 0 (ok)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/03/10/openssl-client-does-not-check-commonname/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing /tmp on boot</title>
		<link>http://www.outflux.net/blog/archives/2010/03/10/clearing-tmp-on-boot/</link>
		<comments>http://www.outflux.net/blog/archives/2010/03/10/clearing-tmp-on-boot/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 23:48:14 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=328</guid>
		<description><![CDATA[I don&#8217;t like unconditionally clearing /tmp on boot, since I&#8217;m invariably working on something in there when my system locks up.  But I do like /tmp getting cleaned up from time to time.  As a compromise, I&#8217;ve set TMPTIME=7 in /etc/default/rcS so that only stuff older than 7 days is deleted when I [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like unconditionally clearing <code>/tmp</code> on boot, since I&#8217;m invariably working on something in there when my system locks up.  But I do like <code>/tmp</code> getting cleaned up from time to time.  As a compromise, I&#8217;ve set <code>TMPTIME=7</code> in <code>/etc/default/rcS</code> so that only stuff older than 7 days is deleted when I reboot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/03/10/clearing-tmp-on-boot/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cylon Dorkshield</title>
		<link>http://www.outflux.net/blog/archives/2010/03/08/cylon-dorkshield/</link>
		<comments>http://www.outflux.net/blog/archives/2010/03/08/cylon-dorkshield/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 04:42:12 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=323</guid>
		<description><![CDATA[I&#8217;ve finally soldered on the LEDs for the Cylon DorkShield I designed and got built in a recent DorkBotPDX PCB run.  I&#8217;m having trouble with the programmer, but I got the shield mostly working:

]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://www.outflux.net/blog/archives/2009/10/07/larson-scanner-on-arduino/">finally</a> soldered on the LEDs for the Cylon DorkShield I designed and got built in a recent <a href="http://dorkbotpdx.org/">DorkBotPDX</a> PCB run.  I&#8217;m having trouble with the <a href="http://dorkbotpdx.org/wiki/benito">programmer</a>, but I got the shield mostly working:</p>
<p><img src="http://outflux.net/projects/arduino/larson-scanner/cylon-dorkshield.jpg" alt="Cylon DorkShield" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/03/08/cylon-dorkshield/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>egosurfing with git</title>
		<link>http://www.outflux.net/blog/archives/2010/02/28/egosurfing-with-git/</link>
		<comments>http://www.outflux.net/blog/archives/2010/02/28/egosurfing-with-git/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 20:19:39 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=320</guid>
		<description><![CDATA[I&#8217;m never sure when my commits to Linux actually make it into an official release.  Luckily, since releases are tagged, I can use &#8220;git tag --contains COMMIT&#8221; to find them.  So, in a stunning display of inefficiency, here&#8217;s what I use to find my commits:

git log --author='Kees Cook' --pretty=oneline &#124; \
while read commit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m never sure when my commits to Linux actually make it into an official release.  Luckily, since releases are tagged, I can use &#8220;<code>git tag --contains COMMIT</code>&#8221; to find them.  So, in a stunning display of inefficiency, here&#8217;s what I use to find my commits:</p>
<pre class="brush:bash">
git log --author='Kees Cook' --pretty=oneline | \
while read commit name; do \
    echo $(git tag --contains $commit | head -n1): "$name"; \
done
</pre>
<p>Which lets me know where my code is with respect to releases:</p>
<pre>
v2.6.33: x86, mm: Report state of NX protections during boot
v2.6.33: sysctl: require CAP_SYS_RAWIO to set mmap_min_addr
v2.6.32: proc: fix reported unit for RLIMIT_CPU
v2.6.31: modules: sysctl to block module loading
...
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/02/28/egosurfing-with-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>fun with process scheduling</title>
		<link>http://www.outflux.net/blog/archives/2010/02/25/fun-with-process-scheduling/</link>
		<comments>http://www.outflux.net/blog/archives/2010/02/25/fun-with-process-scheduling/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 19:04:53 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=316</guid>
		<description><![CDATA[In an attempt to force an exec to totally stall so I could attach gdb to a process that does a setuid transition without freaking it out (i.e. can&#8217;t launch &#8220;sudo gdb &#8230;&#8221;), I briefly played with process priority, scheduling, and CPU affinity (pinning a process to a CPU).
So far, the best attempt at stalling [...]]]></description>
			<content:encoded><![CDATA[<p>In an attempt to force an exec to totally stall so I could attach gdb to a process that does a setuid transition without freaking it out (i.e. can&#8217;t launch &#8220;sudo gdb &#8230;&#8221;), I briefly played with process priority, scheduling, and CPU affinity (pinning a process to a CPU).</p>
<p>So far, the best attempt at stalling the process was to set CPU affinity, set its scheduling policy (IDLE), drop the priority value fully (19), and then run a CPU hog with the same CPU affinity with a very high priority (-20).</p>
<p>Staller: <code>sudo schedtool -a 0 -N -n -20 -e /tmp/spin-cpu</code><br />
Stallee: <code>schedtool -a 0 -D -n 19 -e /usr/bin/sudo -s</code></p>
<p>The hope was to then run &#8220;<code>sudo gdb /usr/bin/sudo $(pidof sudo)</code>&#8220;, but it seems that this still isn&#8217;t enough to make the exec of sudo totally stall while the &#8220;spin-cpu&#8221; process is running &#8212; it certainly executes more slowly, but I want it to <em>stop</em>.</p>
<p>I have this feeling like I&#8217;m missing something obvious about how to accomplish this gdb session sanely.  I wonder if I can get gdb to switch targets across a child exec, i.e. run gdb as root on a program that fully drops privs, but then execs sudo.  Guess it&#8217;s time to go read the gdb manual some more&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/02/25/fun-with-process-scheduling/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>data mining for NX bit</title>
		<link>http://www.outflux.net/blog/archives/2010/02/18/data-mining-for-nx-bit/</link>
		<comments>http://www.outflux.net/blog/archives/2010/02/18/data-mining-for-nx-bit/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 19:15:41 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=305</guid>
		<description><![CDATA[9% of Ubuntu systems that were used to report bugs that included their /proc/cpuinfo file need to fix their BIOS settings to gain the NX bit.
Check for yourself.  (Run it with --verbose for useful details.)
Out of 7511 Ubuntu bugs Brian Murray collected for me that included /proc/cpuinfo files, there were 7270 unique contents (which [...]]]></description>
			<content:encoded><![CDATA[<p>9% of Ubuntu systems that were used to report bugs that included their <code>/proc/cpuinfo</code> file need to fix their BIOS settings to <a href="http://www.outflux.net/blog/archives/2008/11/21/make-your-bios-love-security/">gain the NX bit</a>.</p>
<p><a href="http://bazaar.launchpad.net/~kees/%2Bjunk/cpu-checker/annotate/head%3A/check-bios-nx">Check</a> for yourself.  (Run it with <code>--verbose</code> for useful details.)</p>
<p>Out of 7511 Ubuntu bugs <a href="http://www.murraytwins.com/blog">Brian Murray</a> collected for me that included <code>/proc/cpuinfo</code> files, there were 7270 unique contents (which surprised me &#8212; I was expecting this to be much lower).</p>
<ul>
<li>5 (0.07%) were non-x86.</li>
<li>1 (0.02%) had corrupted contents (likely due to a search/replace in apport gone awry).</li>
<li>5670 (77.99%) had NX (this also surprised me &#8212; I was not expecting it to be so high).</li>
<li>337 (4.64%) lacked PAE, and so cannot have NX (I didn&#8217;t expect this to be so low; Ubuntu bug reporters must have relatively recent hardware overall).</li>
<li>595 (8.18%) had PAE and correctly lacked NX (I didn&#8217;t expect this to be so high &#8212; PAE without NX is a bit more common than I&#8217;d hoped; hopefully these systems are running 32bit kernels to at least get the partial NX emulation).</li>
<li>662 (9.1%) had PAE but incorrectly lacked NX.</li>
</ul>
<p>It&#8217;s this last group of systems I&#8217;m hoping to get fixed through <a href="https://wiki.ubuntu.com/Security/CPUFeatures">education</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/02/18/data-mining-for-nx-bit/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>easy example of filesystem capabilities</title>
		<link>http://www.outflux.net/blog/archives/2010/02/09/easy-example-of-fscaps/</link>
		<comments>http://www.outflux.net/blog/archives/2010/02/09/easy-example-of-fscaps/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 19:15:54 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=302</guid>
		<description><![CDATA[Instead of using setuid programs, the goal for the future is to use fine-grained capabilities.  For example, here is /bin/ping:
$ ls -la /bin/ping
-rwsr-xr-x 1 root root 35680 2009-11-05 00:41 /bin/ping
$ ./ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms
&#8230;
$ sudo setcap CAP_NET_RAW=ep /bin/ping
$ getcap /bin/ping
/bin/ping = cap_net_raw+ep
$ ./ping [...]]]></description>
			<content:encoded><![CDATA[<p>Instead of using setuid programs, the goal for the future is to use fine-grained capabilities.  For example, here is <code>/bin/ping</code>:</p>
<blockquote><p>$ <strong>ls -la /bin/ping</strong><br />
-rwsr-xr-x 1 root root 35680 2009-11-05 00:41 /bin/ping<br />
$ <strong>./ping 127.0.0.1</strong><br />
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.<br />
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms<br />
&#8230;<br />
$ <strong>sudo setcap CAP_NET_RAW=ep /bin/ping</strong><br />
$ <strong>getcap /bin/ping</strong><br />
/bin/ping = cap_net_raw+ep<br />
$ <strong>./ping 127.0.0.1</strong><br />
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.<br />
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.041 ms<br />
&#8230;<br />
$ <strong>dmesg | tail -n1</strong><br />
[212275.772124] warning: `/bin/ping&#8217; has both setuid-root and effective capabilities. Therefore not raising all capabilities.
</p></blockquote>
<p>The best part is that the kernel will choose the set of least privileges when both setuid and capabilities exist.  Easy way to transition!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/02/09/easy-example-of-fscaps/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>rng-tools with TPM</title>
		<link>http://www.outflux.net/blog/archives/2010/02/08/rng-tools-with-tpm/</link>
		<comments>http://www.outflux.net/blog/archives/2010/02/08/rng-tools-with-tpm/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 03:32:59 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=298</guid>
		<description><![CDATA[In Ubuntu, I uploaded an rng-tools that supports the RNG in TPM devices (my patch is waiting in Debian).  This hardware is available on a bunch of systems, including several Thinkpads and the Intel Q35, Q45 and newer main boards.
While most TPM RNGs aren&#8217;t really heavy-duty hardware RNGs, they are at least a mild [...]]]></description>
			<content:encoded><![CDATA[<p>In Ubuntu, I uploaded an rng-tools that supports the <a href="http://www.outflux.net/blog/archives/2009/10/22/tpm-as-rng/">RNG in TPM</a> devices (my patch is <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542599">waiting</a> in Debian).  This hardware is available on a bunch of systems, including several Thinkpads and the Intel Q35, Q45 and newer main boards.</p>
<p>While most TPM RNGs aren&#8217;t really heavy-duty hardware RNGs, they are at least a mild source of randomness.  I&#8217;ll be using an <a href="http://www.entropykey.co.uk/">entropy key</a> eventually, but for now, the TPM can supplement my collected entropy.</p>
<p><code>/etc/default/rng-tools</code>:</p>
<blockquote><p>HRNGDEVICE=/dev/null<br />
RNGDOPTIONS=&#8221;&#8211;hrng=tpm &#8211;fill-watermark=90% &#8211;feed-interval=1&#8243;</p></blockquote>
<p>After it&#8217;s been running a bit:</p>
<blockquote><p>
Feb  8 19:10:51 linux rngd[13143]: stats: bits received from HRNG source: 6180064<br />
Feb  8 19:10:51 linux rngd[13143]: stats: bits sent to kernel pool: 6166144<br />
Feb  8 19:10:51 linux rngd[13143]: stats: entropy added to kernel pool: 4624608<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2 successes: 309<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2 failures: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2(2001-10-10) Monobit: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2(2001-10-10) Poker: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2(2001-10-10) Runs: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2(2001-10-10) Long run: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS 140-2(2001-10-10) Continuous run: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: HRNG source speed: (min=5.207; avg=6.145; max=6.200)Kibits/s<br />
Feb  8 19:10:51 linux rngd[13143]: stats: FIPS tests speed: (min=66.925; avg=75.789; max=112.861)Mibits/s<br />
Feb  8 19:10:51 linux rngd[13143]: stats: Lowest ready-buffers level: 0<br />
Feb  8 19:10:51 linux rngd[13143]: stats: Entropy starvations: 308<br />
Feb  8 19:10:51 linux rngd[13143]: stats: Time spent starving for entropy: (min=3150263; avg=3178447.994; max=3750848)us
</p></blockquote>
<p>And now the kernel entropy pool is high:</p>
<blockquote><p>$ <strong>echo $(cat /proc/sys/kernel/random/entropy_avail)/$(cat /proc/sys/kernel/random/poolsize)</strong><br />
3968/4096
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/02/08/rng-tools-with-tpm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google is wardriving</title>
		<link>http://www.outflux.net/blog/archives/2010/01/24/google-is-wardriving/</link>
		<comments>http://www.outflux.net/blog/archives/2010/01/24/google-is-wardriving/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 04:28:56 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=292</guid>
		<description><![CDATA[So, a while back, Google started providing location services.  This seemed pretty cool, but I kind of ignored it until recently when I was playing with my Android&#8217;s location API.  With the GPS off, and no cell towers visible (my basement gets terrible cell service), my phone knew within about 500 feet of [...]]]></description>
			<content:encoded><![CDATA[<p>So, a while back, Google started providing <a href="http://google-latlong.blogspot.com/2009/07/blue-circle-comes-to-your-desktop.html">location</a> <a href="http://www.google.com/latitude/apps">services</a>.  This seemed pretty cool, but I kind of ignored it until recently when I was playing with my Android&#8217;s <a href="http://developer.android.com/reference/android/location/package-summary.html">location API</a>.  With the GPS off, and no cell towers visible (my basement gets terrible cell service), my phone knew within about 500 feet of where it actually was.  All I was connected to was my wifi.</p>
<p>Bottom line: it seems that Google, among other methods, is likely <a href="http://en.wikipedia.org/wiki/Wardriving">wardriving</a> while photographing for <a href="http://maps.google.com/help/maps/streetview/">Street View</a>.  They are now able to pinpoint wifi access points if they happened to see it while driving through your city.</p>
<p>I&#8217;m really rather astonished that no one is freaking out about this; I&#8217;m a bit unnerved.  I <a href="http://outflux.net/software/shorts/geoloc.py">implemented the location-of-your-wifi</a> <a href="http://code.google.com/p/gears/wiki/GeolocationAPI">API</a> quickly, so I could terrify myself further.  You can do lookups via my <a href="http://outflux.net/geoloc/">location website</a> too, if you want.</p>
<p><strong>UPDATE</strong>: yeah, it would seem to be crowd-sourced wifi and cell tower triangulation data.  I should say &#8220;Google is WarCrowding&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/01/24/google-is-wardriving/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Using huludesktop on MythTV</title>
		<link>http://www.outflux.net/blog/archives/2010/01/19/using-huludesktop-on-mythtv/</link>
		<comments>http://www.outflux.net/blog/archives/2010/01/19/using-huludesktop-on-mythtv/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 19:29:47 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=281</guid>
		<description><![CDATA[Based on a friend&#8217;s recommendation, I decided I would install Hulu Desktop for my MythTV system.
The MythTV wiki instructions were very good.  However, I didn&#8217;t like that it was a closed-source binary doing network traffic. (While &#8220;system&#8221; doesn&#8217;t show up in &#8220;readelf -r&#8221; output, that doesn&#8217;t mean it isn&#8217;t doing direct syscalls, or manually [...]]]></description>
			<content:encoded><![CDATA[<p>Based on a friend&#8217;s recommendation, I decided I would install <a href="http://www.hulu.com/labs/hulu-desktop-linux">Hulu Desktop</a> for my MythTV system.</p>
<p>The <a href="http://www.mythtv.org/wiki/Hulu_Desktop_Integration">MythTV wiki instructions</a> were very good.  However, I didn&#8217;t like that it was a closed-source binary doing network traffic. (While &#8220;system&#8221; doesn&#8217;t show up in &#8220;<code>readelf -r</code>&#8221; output, that doesn&#8217;t mean it isn&#8217;t doing direct syscalls, or manually finding the &#8220;system&#8221; offset in the libc library, or is vulnerable to overflows, and on and on.)  So, to put my mind at ease, I decided to confine it in an AppArmor profile:</p>
<blockquote><p>#include &lt;tunables/global&gt;</p>
<p>/usr/bin/huludesktop {<br />
  #include &lt;abstractions/gnome&gt;<br />
  #include &lt;abstractions/audio&gt;<br />
  #include &lt;abstractions/nameservice&gt;</p>
<p>  /etc/huludesktop/** r,<br />
  @{HOME}/.huludesktop rwkl,<br />
  @{HOME}/.local/share/.huludesktop.data rwkl,<br />
  @{HOME}/.macromedia/Flash_Player/macromedia.com/support/flashplayer/sys/*.hulu.com/** r,<br />
  @{HOME}/.macromedia/Flash_Player/#SharedObjects/ r,<br />
  @{HOME}/.macromedia/Flash_Player/#SharedObjects/*/*.hulu.com/ rw,<br />
  @{HOME}/.macromedia/Flash_Player/#SharedObjects/*/*.hulu.com/** rwkl,</p>
<p>  # MythTV is already managing the screensaver<br />
  deny /usr/bin/xdg-screensaver x,<br />
}
</p></blockquote>
<p>Additionally, I disabled its <a href="https://wiki.ubuntu.com/SecurityTeam/Roadmap/ExecutableStacks">executable stack</a>, which seems to serve no purpose:<br />
<code>$ <strong>sudo execstack -c /usr/bin/huludesktop</strong></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2010/01/19/using-huludesktop-on-mythtv/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>happy holidays 2009!</title>
		<link>http://www.outflux.net/blog/archives/2009/12/25/happy-holidays-2009/</link>
		<comments>http://www.outflux.net/blog/archives/2009/12/25/happy-holidays-2009/#comments</comments>
		<pubDate>Sat, 26 Dec 2009 05:19:09 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=274</guid>
		<description><![CDATA[Happy Holidays!
Or, as my firewall reported this morning:
Dec 25 04:39:18 firewall kernel: [1054241.000084] sd 2:0:0:0: [sda] ABORT operation started
...
Dec 25 04:40:10 firewall kernel: [1054292.072173] raid1: sdb2: redirecting sector 3490144 to another mirror

I guess I&#8217;m getting my firewall a new hard drive for Christmas.  :)
]]></description>
			<content:encoded><![CDATA[<p>Happy Holidays!</p>
<p>Or, as my firewall reported this morning:</p>
<blockquote><p><code>Dec 25 04:39:18 firewall kernel: [1054241.000084] sd 2:0:0:0: [sda] ABORT operation started<br />
...<br />
Dec 25 04:40:10 firewall kernel: [1054292.072173] raid1: sdb2: redirecting sector 3490144 to another mirror<br />
</code></p></blockquote>
<p>I guess I&#8217;m getting my firewall a new hard drive for Christmas.  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/12/25/happy-holidays-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>headache empathy</title>
		<link>http://www.outflux.net/blog/archives/2009/12/16/headache-empathy/</link>
		<comments>http://www.outflux.net/blog/archives/2009/12/16/headache-empathy/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 05:20:10 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=271</guid>
		<description><![CDATA[Run &#8220;gstreamer-properties&#8220;, click the &#8220;Video&#8221; tab, change Default Input Plugin to &#8220;Custom&#8221;, and add this Pipeline:
v4l2src ! ffmpegcolorspace ! vertigotv ! ffmpegcolorspace
Now when Empathy video-chatting with a friend, you can give them a headache!
Or give yourself a headache by trying it directly from the command line:
gst-launch v4l2src ! ffmpegcolorspace ! vertigotv ! ffmpegcolorspace ! xvimagesink
Feel [...]]]></description>
			<content:encoded><![CDATA[<p>Run &#8220;<code>gstreamer-properties</code>&#8220;, click the &#8220;Video&#8221; tab, change Default Input Plugin to &#8220;Custom&#8221;, and add this Pipeline:</p>
<blockquote><p><code>v4l2src ! ffmpegcolorspace ! vertigotv ! ffmpegcolorspace</code></p></blockquote>
<p>Now when <a href="http://www.jonobacon.org/2009/10/09/this-is-what-awesome-looks-like/">Empathy video-chatting</a> with a friend, you can give them a headache!</p>
<p>Or give yourself a headache by trying it directly from the command line:</p>
<blockquote><p><code>gst-launch v4l2src ! ffmpegcolorspace ! vertigotv ! ffmpegcolorspace ! xvimagesink</code></p></blockquote>
<p>Feel free to replace &#8220;<code>vertigotv</code>&#8221; with any other or more of the video effects listed in &#8220;<code>gst-inspect effectv</code>&#8220;.</p>
<p>Here&#8217;s me with <code>edgetv ! vertigotv</code>:</p>
<p><img src="http://outflux.net/gstreamer/edge-vertigo.png" alt="Edge Vertigo" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/12/16/headache-empathy/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>install from official repositories only</title>
		<link>http://www.outflux.net/blog/archives/2009/12/09/install-from-official-repositories-only/</link>
		<comments>http://www.outflux.net/blog/archives/2009/12/09/install-from-official-repositories-only/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 18:02:10 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=269</guid>
		<description><![CDATA[As quickly pointed out by Rick, don&#8217;t install random software that isn&#8217;t in the official distribution archive unless you really know what you&#8217;re doing (and copy/pasting commands from a website doesn&#8217;t count).  You&#8217;re just asking to be made part of a botnet.
]]></description>
			<content:encoded><![CDATA[<p>As quickly pointed out by <a href="http://theravingrick.blogspot.com/2009/12/and-so-it-begins.html">Rick</a>, don&#8217;t install random software that isn&#8217;t in the official distribution archive unless you really know what you&#8217;re doing (and copy/pasting commands from a website doesn&#8217;t count).  You&#8217;re just asking to be made part of a botnet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/12/09/install-from-official-repositories-only/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>missing kernel features in ARM</title>
		<link>http://www.outflux.net/blog/archives/2009/11/24/missing-kernel-features-in-arm/</link>
		<comments>http://www.outflux.net/blog/archives/2009/11/24/missing-kernel-features-in-arm/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 06:38:29 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=267</guid>
		<description><![CDATA[As more attention is given to the ARM ports of Linux, I&#8217;m hoping someone (maybe me if I learn a bunch) will be able to implement some upstream kernel features that are implemented only on x86 so far:

ASLR of mmap allocations
ASLR of text/exec area
ASLR of vdso
ASLR of brk area

Stack is already randomized, it should be [...]]]></description>
			<content:encoded><![CDATA[<p>As more attention is given to the ARM ports of Linux, I&#8217;m hoping someone (maybe me if I learn a bunch) will be able to implement some upstream kernel features that are implemented only on x86 so far:</p>
<ul>
<li>ASLR of mmap allocations</li>
<li>ASLR of text/exec area</li>
<li>ASLR of vdso</li>
<li>ASLR of brk area</li>
</ul>
<p>Stack is already randomized, it should be easy to do the rest!  ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/11/24/missing-kernel-features-in-arm/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>karmic and log rotation</title>
		<link>http://www.outflux.net/blog/archives/2009/10/24/karmic-and-log-rotation/</link>
		<comments>http://www.outflux.net/blog/archives/2009/10/24/karmic-and-log-rotation/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 18:00:30 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=260</guid>
		<description><![CDATA[In Ubuntu&#8217;s Karmic and and Debian&#8217;s Lenny, sysklogd was replaced with rsyslog.  This is fine, since rsyslog will have converted your /etc/syslog.conf to /etc/rsyslog.d/50-default.conf.  However, if you modified the (maddeningly strange sysklogd-specific) log file rotation in /etc/cron.daily/sysklogd or /etc/cron.weekly/sysklogd, you&#8217;ll want to review the new (sane) /etc/logrotate.d/rsyslog.  (Note also that savelog uses [...]]]></description>
			<content:encoded><![CDATA[<p>In Ubuntu&#8217;s Karmic and and Debian&#8217;s Lenny, <code>sysklogd</code> was replaced with <code>rsyslog</code>.  This is fine, since <code>rsyslog</code> will have converted your <code>/etc/syslog.conf</code> to <code>/etc/rsyslog.d/50-default.conf</code>.  However, if you modified the (maddeningly strange sysklogd-specific) log file rotation in <code>/etc/cron.daily/sysklogd</code> or <code>/etc/cron.weekly/sysklogd</code>, you&#8217;ll want to review the new (sane) <code>/etc/logrotate.d/rsyslog</code>.  (Note also that <code>savelog</code> uses <code>.0</code> as the first rotated file extension, and <code>logrotate</code> uses <code>.1</code>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/10/24/karmic-and-log-rotation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TPM as RNG</title>
		<link>http://www.outflux.net/blog/archives/2009/10/22/tpm-as-rng/</link>
		<comments>http://www.outflux.net/blog/archives/2009/10/22/tpm-as-rng/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 06:43:29 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=255</guid>
		<description><![CDATA[I was reminded about some TPM coding I&#8217;d done to get random bytes from the pRNG on my TPM-enabled system from Matt Domsch&#8217;s recent post.  I&#8217;m not fully convinced that the pRNG of the TPM is an appropriate source of entropy, but it does pass my simple FIPS-140-2 test.
I had to find the Intel [...]]]></description>
			<content:encoded><![CDATA[<p>I was reminded about some <a href="http://www.trustedcomputinggroup.org/resources/tpm_main_specification">TPM</a> coding I&#8217;d done to <a href="http://outflux.net/tpm/tpm-getrand.c">get random bytes</a> from the pRNG on my TPM-enabled system from <a href="http://domsch.com/blog/?p=107">Matt Domsch&#8217;s recent post</a>.  I&#8217;m not fully convinced that the pRNG of the TPM is an appropriate source of entropy, but it does pass my simple <a href="http://en.wikipedia.org/wiki/FIPS_140">FIPS-140-2</a> <a href="http://outflux.net/tpm/fips-140-2.py">test</a>.</p>
<p>I had to find the <a href="http://downloadmirror.intel.com/15034/eng/DQ965CO_TPM_QuickRefGuide03.pdf">Intel TPM docs</a> to figure out how to enable TPM on my system.  It was under &#8220;Advanced / Peripherals&#8221;.  I was expecting it under &#8220;Security&#8221;, like every other BIOS I&#8217;d seen.  After that:</p>
<p><code></p>
<blockquote><p>
$ <strong>sudo apt-get install trousers tpm-tools</strong><br />
...<br />
$ <strong>sudo modprobe tpm_tis</strong><br />
$ <strong>dmesg | grep -i tpm</strong><br />
[676618.167313] tpm_tis 00:07: 1.2 TPM (device-id 0xFE, rev-id 70)<br />
$ <strong>sudo service trousers start</strong><br />
...<br />
$ <strong>tpm_version</strong><br />
  TPM 1.2 Version Info:<br />
  Chip Version:        1.2.2.16<br />
  Spec Level:          2<br />
  Errata Revision:     1<br />
  TPM Vendor ID:       WEC<br />
  TPM Version:         01010000<br />
  Manufacturer Info:   57454300<br />
$ <strong>./tpm-getrand | hexdump -C</strong><br />
00000000  61 07 23 ff 71 3e 25 e8  f0 d5 de a7 a3 07 21 dc  |a.#.q&gt;%.......!.|
</p></blockquote>
<p></code></p>
<p>I could run rngd with a named pipe, but it&#8217;d be nice to have a new driver that could run a command instead to get the next 20000 bits.</p>
<p><strong>UPDATE</strong>: I&#8217;ve <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=15;filename=tpm-rng.patch;att=1;bug=542599">implemented</a> this in rngd now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/10/22/tpm-as-rng/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Larson Scanner on Arduino</title>
		<link>http://www.outflux.net/blog/archives/2009/10/07/larson-scanner-on-arduino/</link>
		<comments>http://www.outflux.net/blog/archives/2009/10/07/larson-scanner-on-arduino/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 16:58:26 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Embedded]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=251</guid>
		<description><![CDATA[Inspired by the Larson Scanner project, I finally broke out my Arduino and ported the code from the ATtiny to the ATmega.  (The Arduino IDE runs fine with openjdk-6.)  I&#8217;m sure the power usage is terrible, but I wasn&#8217;t after long battery life.  I wanted my very own Cylon eye.

Since I was [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by the <a href="http://www.evilmadscientist.com/article.php/larsonkit">Larson Scanner</a> project, I finally broke out my <a href="http://www.arduino.cc/">Arduino</a> and ported the code from the <a href="http://www.evilmadscientist.com/source/ix/larson.zip">ATtiny</a> to the <a href="http://outflux.net/projects/arduino/larson-scanner/LarsonScanner.pde">ATmega</a>.  (The Arduino IDE runs fine with <a href="http://www.outflux.net/blog/archives/2009/09/12/uninstall-sun-java6/">openjdk-6</a>.)  I&#8217;m sure the power usage is terrible, but I wasn&#8217;t after long battery life.  I wanted my very own <a href="http://outflux.net/projects/arduino/larson-scanner/dscn1805.avi">Cylon eye</a>.</p>
<p><img src="http://outflux.net/projects/arduino/larson-scanner/dork-final.jpg" alt="DorkBoard running the Cylon eye" /></p>
<p>Since I was successful with porting the code and <a href="http://outflux.net/projects/arduino/larson-scanner/dscn1804.jpg">wiring up the Arduino</a>, I figured I&#8217;d see if the tiny Arduino-clone called the <a href="http://dorkbotpdx.org/wiki/dorkboard">&#8220;DorkBoard&#8221;</a> would <a href="http://outflux.net/projects/arduino/larson-scanner/dscn1807.jpg">work</a> with it <a href="http://outflux.net/projects/arduino/larson-scanner/dscn1806.avi">too</a>.</p>
<p>Later in the weekend I grabbed a AAA-battery holder and hooked that up so the eye is untethered from the USB power source.  Next up, coding the pesky self-awareness.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/10/07/larson-scanner-on-arduino/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
<enclosure url="http://outflux.net/projects/arduino/larson-scanner/dscn1805.avi" length="4803322" type="video/x-msvideo" />
<enclosure url="http://outflux.net/projects/arduino/larson-scanner/dscn1806.avi" length="6235604" type="video/x-msvideo" />
		</item>
		<item>
		<title>uninstall sun-java6</title>
		<link>http://www.outflux.net/blog/archives/2009/09/12/uninstall-sun-java6/</link>
		<comments>http://www.outflux.net/blog/archives/2009/09/12/uninstall-sun-java6/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 19:59:35 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=246</guid>
		<description><![CDATA[With the vrms meme raging on Planet Ubuntu, I noticed some people still have sun-java6 installed.  I&#8217;ve been using openjdk-6 since Hardy, and everything I use works fine with it (e.g. Vuze, Catan, Eclipse, FreeMind, and even Facebook&#8217;s photo uploader thing).  Given the Ubuntu Tech Board&#8217;s &#8220;remove sun-java6 from the archive&#8221; Agenda item, [...]]]></description>
			<content:encoded><![CDATA[<p>With the vrms meme raging on Planet Ubuntu, I noticed some people still have sun-java6 installed.  I&#8217;ve been using openjdk-6 since Hardy, and everything I use works fine with it (e.g. <a href="http://www.vuze.com/">Vuze</a>, <a href="http://www.jsettlers.com/">Catan</a>, <a href="http://www.eclipse.org/">Eclipse</a>, <a href="http://freemind.sourceforge.net/">FreeMind</a>, and even Facebook&#8217;s photo uploader thing).  Given the Ubuntu Tech Board&#8217;s <a href="https://wiki.ubuntu.com/TechnicalBoardAgenda">&#8220;remove sun-java6 from the archive&#8221;</a> Agenda item, it&#8217;s possible sun-java6 (being redundant and <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=544629">orphaned</a>) would go away in Ubuntu Karmic (sun-java5 is already gone because Sun will <a href="http://java.sun.com/products/archive/eol.policy.html">drop support</a> for it in October, and sun-java6 is not far behind).</p>
<p>I&#8217;ve heard some noises about openjdk-6 not working for people, but I haven&#8217;t actually seen any direct technical evidence of something working in one and not the other.  Seeing as Jaunty&#8217;s OpenJDK was <a href="https://lists.ubuntu.com/archives/ubuntu-devel-announce/2009-July/000587.html">certified by Sun</a>, it would be very interesting to find failures, as this would indicate that Sun&#8217;s certifications are missing something.</p>
<p>Looking for examples of failures in Google, I couldn&#8217;t find anything with obvious test-cases that failed with openjdk-6.  I suspect I&#8217;m just not trying hard enough, but I&#8217;m curious what other people have run into.</p>
<p>Test for yourself:</p>
<blockquote><p><code>sudo apt-get purge sun-java6-jdk sun-java6-jre sun-java6-bin sun-java6-plugin<br />
sudo apt-get install openjdk-6-jdk icedtea6-plugin</code>
</p></blockquote>
<p>(Don&#8217;t forget to restart your browser.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/09/12/uninstall-sun-java6/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>vrms meme: 15.2%</title>
		<link>http://www.outflux.net/blog/archives/2009/09/10/vrms-meme-152/</link>
		<comments>http://www.outflux.net/blog/archives/2009/09/10/vrms-meme-152/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 02:57:11 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=238</guid>
		<description><![CDATA[Inspired by Jorge, I decided to see how high a vrms score I could manage.  I started with a minimal chroot (via mk-sbuild-lv), and did:
$ sudo -s
# echo "deb http://archive.canonical.com/ jaunty partner" &#62;&#62; /etc/apt/sources.list
# sudo apt-get update
# apt-get --no-install-recommends install $(grep ^Package /var/lib/apt/lists/*{multiverse,partner}*Packages &#124; awk '{print $NF}' &#124; sort -u &#124; egrep -v '^(ttf-lucida&#124;crafty-books-medium&#124;crafty-books-small&#124;festvox-rablpc8k&#124;kxmame&#124;funguloids&#124;ltsp-controlaula&#124;mplayer-nogui&#124;ora2pg&#124;python-pygpu&#124;sdlmame&#124;sdlmame-tools&#124;linux-rt&#124;e-uae&#124;e-uae-dbg&#124;sun-java5-fonts&#124;sun-java6-fonts)$')

Since [...]]]></description>
			<content:encoded><![CDATA[<p>Inspired by <a href="http://identi.ca/notice/9803393">Jorge</a>, I decided to see how high a <code>vrms</code> score I could manage.  I started with a minimal chroot (via <a href="https://help.ubuntu.com/community/SbuildLVMHowto">mk-sbuild-lv</a>), and did:</p>
<blockquote><p><code>$ sudo -s<br />
# echo "deb http://archive.canonical.com/ jaunty partner" &gt;&gt; /etc/apt/sources.list<br />
# sudo apt-get update<br />
# apt-get --no-install-recommends install $(grep ^Package /var/lib/apt/lists/*{multiverse,partner}*Packages | awk '{print $NF}' | sort -u | egrep -v '^(ttf-lucida|crafty-books-medium|crafty-books-small|festvox-rablpc8k|kxmame|funguloids|ltsp-controlaula|mplayer-nogui|ora2pg|python-pygpu|sdlmame|sdlmame-tools|linux-rt|e-uae|e-uae-dbg|sun-java5-fonts|sun-java6-fonts)$')<br />
</code></p></blockquote>
<p>Since we want to minimize free packages, I added <code>--no-install-recommends</code> since it would only pull in free stuff (since I was already installing all of multiverse and partner directly).  I tried to solve conflicts by making choices that would install the maximum number of packages. After installing 10G worth of packages, I had my results:</p>
<blockquote><p><code># vrms | grep ^[a-z0-9] | wc -l<br />
514<br />
# vrms | tail -n2<br />
  342 non-free packages, 15.2% of 2252 installed packages.<br />
  172 contrib packages, 7.6% of 2252 installed packages.<br />
</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/09/10/vrms-meme-152/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>blocking module loading</title>
		<link>http://www.outflux.net/blog/archives/2009/07/31/blocking-module-loading/</link>
		<comments>http://www.outflux.net/blog/archives/2009/07/31/blocking-module-loading/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 19:47:38 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=230</guid>
		<description><![CDATA[New for Linux 2.6.31 (and Ubuntu 9.10) is the ability to throw a one-way toggle to block module loading via /proc/sys/kernel/modules_disabled:
# uname -a
Linux sec-karmic-amd64 2.6.31-4-generic #23-Ubuntu SMP Mon Jul 27 18:39:59 UTC 2009 x86_64 GNU/Linux
# lsmod &#124; head -n3
Module                 [...]]]></description>
			<content:encoded><![CDATA[<p>New for Linux 2.6.31 (and Ubuntu 9.10) is the ability to <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=3d43321b7015387cfebbe26436d0e9d299162ea1">throw a one-way toggle</a> to block module loading via <code>/proc/sys/kernel/modules_disabled</code>:</p>
<p><code># <strong>uname -a</strong><br />
Linux sec-karmic-amd64 2.6.31-4-generic #23-Ubuntu SMP Mon Jul 27 18:39:59 UTC 2009 x86_64 GNU/Linux<br />
# <strong>lsmod | head -n3</strong><br />
Module                  Size  Used by<br />
binfmt_misc            10220  1<br />
ppdev                   8200  0<br />
# <strong>cat /proc/sys/kernel/modules_disabled</strong><br />
0<br />
# <strong>modprobe usb-storage</strong><br />
# <strong>lsmod | head -n3</strong><br />
Module                  Size  Used by<br />
usb_storage            65600  0<br />
binfmt_misc            10220  1<br />
# <strong>echo 1 &gt; /proc/sys/kernel/modules_disabled</strong><br />
# <strong>rmmod usb-storage</strong><br />
ERROR: Removing 'usb_storage': Operation not permitted<br />
# <strong>modprobe zlib_deflate</strong><br />
FATAL: Error inserting zlib_deflate (/lib/modules/2.6.31-4-generic/kernel/lib/zlib_deflate/zlib_deflate.ko): Operation not permitted<br />
# <strong>echo 0 &gt; /proc/sys/kernel/modules_disabled</strong><br />
bash: echo: write error: Invalid argument<br />
# <strong>cat /proc/sys/kernel/modules_disabled</strong><br />
1<br />
</code></p>
<p>The intent is for this to allow paranoid server admins (or other people not expecting to hot-plug new hardware or kernel services) the ability to block module loading without compiling a monolithic kernel.</p>
<p>This kind of thing <a href="http://www.debian.org/doc/manuals/securing-debian-howto/ch10.en.html#s-proactive">used to be available</a> through the &#8220;lcap&#8221; utility modifying the global capability bounding set (which was removed in 2.6.25), but init could always be made to turn it back on.</p>
<p>Combined with the <a href="https://wiki.ubuntu.com/Security/Features#/dev/kmem%20disabled">removal of /dev/kmem</a> and the <a href="https://wiki.ubuntu.com/Security/Features#/dev/mem%20protection">hardening of /dev/mem</a>, this closes another kernel rootkit door.  It&#8217;s not a cure-all, but it&#8217;s another layer.</p>
<p>Now we just have to figure out ways to stamp out unexpected ioport-triggered DMA access.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/07/31/blocking-module-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diminished Dapper</title>
		<link>http://www.outflux.net/blog/archives/2009/07/16/diminished-dapper/</link>
		<comments>http://www.outflux.net/blog/archives/2009/07/16/diminished-dapper/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 18:18:14 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=194</guid>
		<description><![CDATA[Dapper has reached it&#8217;s half-way support age.  This means that only shipped server packages are getting official support.  If you&#8217;re still running Dapper, upgrade to Hardy (and then consider upgrading through Intrepid to Jaunty too, since Intrepid and newer has awesome compiler defaults).
Looking back through my build logs, I can see that my [...]]]></description>
			<content:encoded><![CDATA[<p>Dapper has <a href="https://lists.ubuntu.com/archives/ubuntu-announce/2009-July/000123.html">reached</a> it&#8217;s half-way support age.  This means that only shipped server packages are getting official support.  If you&#8217;re still running Dapper, upgrade to Hardy (and then consider upgrading through Intrepid to Jaunty too, since Intrepid and newer has <a href="https://wiki.ubuntu.com/CompilerFlags">awesome compiler defaults</a>).</p>
<p>Looking back through my build logs, I can see that my desktop spent 51 hours, 48 minutes, and 37 seconds building 389 security updates.  As before, these times obviously don’t include patch hunting/development, failed builds, testing, stuff done on my laptop or the porting machines, etc.</p>
<p>Current combined devel/security build standings per release:</p>
<p>hardy: 172:23:11<br />
intrepid: 85:34:53<br />
jaunty: 20:11:53</p>
<p>Thank you Dapper Desktop!  I am reminded what you look like each time I start a Dapper VM.  If not for that, my memory of you would have diminished long ago.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/07/16/diminished-dapper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>partial NX emulation in Ubuntu</title>
		<link>http://www.outflux.net/blog/archives/2009/05/14/nx-emulation-in-ubuntu/</link>
		<comments>http://www.outflux.net/blog/archives/2009/05/14/nx-emulation-in-ubuntu/#comments</comments>
		<pubDate>Thu, 14 May 2009 17:18:09 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=185</guid>
		<description><![CDATA[Now available for early testing, Ubuntu Karmic Alpha 1 has a kernel feature I&#8217;ve long wanted in Ubuntu: NX emulation.  Basically, if your hardware lacks NX support, the kernel will emulate the feature using memory segment limits and ordering.  This was AFAIBT originally developed by PaX, and a similar version (with histories including [...]]]></description>
			<content:encoded><![CDATA[<p>Now available for early testing, <a href="http://www.ubuntu.com/testing/karmic/alpha1">Ubuntu Karmic Alpha 1</a> has a kernel feature I&#8217;ve long wanted in Ubuntu: NX emulation.  Basically, if your hardware <a href="http://www.outflux.net/blog/archives/2008/11/21/make-your-bios-love-security/">lacks NX support</a>, the kernel will emulate the feature using memory segment limits and ordering.  This was AFAIBT originally developed by PaX, and a similar version (with histories including work by Solar Designer and maybe OpenBSD?) has been carried in RedHat/Fedora for a while now (under the larger project called &#8220;ExecShield&#8221;, covering multiple protection technologies).</p>
<p>As more and more of the monolithic ExecShield kernel patch has been taken upstream (many thanks to Arjan van de Ven for <a href="http://lkml.org/lkml/2005/1/27/56">pushing</a> them), the patch in RedHat has been shrinking.  Recently, <a href="http://www.codemonkey.org.uk/">Dave Jones</a> split up the <a href="http://www.codemonkey.org.uk/projects/execshield/">remaining pieces</a> into logical chunks small enough that I could actually read it without going cross-eyed.  From this, I ported the <a href="https://lists.ubuntu.com/archives/kernel-team/2009-April/005666.html">nx-emulation patches</a> to Ubuntu&#8217;s kernel, and now they&#8217;re happily live in Karmic.</p>
<p>So, instead of this:</p>
<blockquote><p><code>$ ./vulnerable-setuid-program $OVERFLOW_AND_SHELLCODE<br />
# id<br />
uid=0(root) gid=0(root) groups=0(root)</code></p></blockquote>
<p>We get this:</p>
<blockquote><p><code>$ ./vulnerable-setuid-program $OVERFLOW_AND_SHELLCODE<br />
Segmentation fault (core dumped)<br />
$ dmesg | tail -n1<br />
[170131.763976] vulnerable-set[16278]: general protection ip:80489c5 sp:bfa3e330 error:0 in vulnerable-setuid-program[8048000+1000]</code></p></blockquote>
<p>Though, as always, please just use 64bit instead.  :)</p>
<p><strong>Update:</strong> gave credit to PaX, thanks for the corrections!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/05/14/nx-emulation-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>recording from PulseAudio</title>
		<link>http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/</link>
		<comments>http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 19:42:59 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=184</guid>
		<description><![CDATA[Every PulseAudio &#8220;Sink&#8221; has a &#8220;Source&#8221; named &#8220;monitor&#8221;.  This lets you attach to a given Sink and chain more stuff to it, for example, recording the audio that is playing through PulseAudio at any given moment.  This is very handy for creating, for example, PubQuiz-style clips of songs, movies, etc.
Here is a script [...]]]></description>
			<content:encoded><![CDATA[<p>Every PulseAudio &#8220;Sink&#8221; has a &#8220;Source&#8221; named &#8220;monitor&#8221;.  This lets you attach to a given Sink and chain more stuff to it, for example, recording the audio that is playing through PulseAudio at any given moment.  This is very handy for creating, for example, PubQuiz-style clips of songs, movies, etc.</p>
<p>Here is a script to find the monitor for the most recently added Sink, record from it, and shove it through &#8220;sox&#8221; to get a WAV instead of raw sound data (requires recent sox, Pulse, etc):</p>
<pre class="brush:bash">#!/bin/bash
WAV="$1"
if [ -z "$WAV" ]; then
    echo "Usage: $0 OUTPUT.WAV" >&#038;2
    exit 1
fi
rm -f "$WAV"

# Get sink monitor:
MONITOR=$(pactl list | grep -A1 '^\*\*\* Source #' | \
    grep '^Name: .*\.monitor$' | cut -d" " -f2 | tail -n1)

# Record it raw, and convert to a wav
echo "Recording to $WAV ..."
echo "Close this window to stop"
parec -d "$MONITOR" | sox -t raw -r 44k -sLb 16 -c 2 - "$WAV"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/04/19/recording-from-pulseaudio/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Goodbye Gutsy</title>
		<link>http://www.outflux.net/blog/archives/2009/04/17/goodbye-gutsy/</link>
		<comments>http://www.outflux.net/blog/archives/2009/04/17/goodbye-gutsy/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 23:05:04 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=183</guid>
		<description><![CDATA[(In reading my prior EOL posts, I realize I should have said &#8220;Enough Edgy&#8221; or something like that to be appropriately alliterative.)
Gutsy is now officially at end-of-life.
Looking back through my build logs, I can see that my desktop spent 25 hours, 6 minutes, and 47 seconds building 208 security updates. (And 18 hours, 23 minutes, [...]]]></description>
			<content:encoded><![CDATA[<p>(In reading my prior EOL posts, I realize I should have said &#8220;Enough Edgy&#8221; or something like that to be appropriately alliterative.)</p>
<p>Gutsy is now officially at <a href="https://lists.ubuntu.com/archives/ubuntu-security-announce/2009-March/000868.html">end-of-life</a>.</p>
<p>Looking back through my build logs, I can see that my desktop spent 25 hours, 6 minutes, and 47 seconds building 208 security updates. (And 18 hours, 23 minutes, 45 seconds doing 335 builds during the Gutsy devel window.) As before, these times obviously don’t include patch hunting/development, failed builds, testing, stuff done on my laptop or the porting machines, etc.</p>
<p>Current combined devel/security build standings per release:</p>
<p>dapper: 51:27:29<br />
hardy: 171:21:40<br />
intrepid: 84:23:19<br />
jaunty: 18:43:09</p>
<p>Thank you Gutsy! You were much nicer than Feisty, especially for wifi on my poor laptop.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/04/17/goodbye-gutsy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>CODEGATE 2009 ran Ubuntu Intrepid</title>
		<link>http://www.outflux.net/blog/archives/2009/04/09/codegate-2009-ran-ubuntu-intrepid/</link>
		<comments>http://www.outflux.net/blog/archives/2009/04/09/codegate-2009-ran-ubuntu-intrepid/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 05:05:03 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=182</guid>
		<description><![CDATA[I&#8217;m pleased to hear than the CODEGATE 2009 International Hacking Contest ran Ubuntu Intrepid for both the qualifying rounds and the final match.  The host machine was running the 32bit -server kernel, so NX was active (along with all the other memory-corruption protections).  From what I can see the compiled challenges were stack-protected [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pleased to hear than the <a href="http://www.codegate.org/Eng/H_Conf/?CodeFlag=0003">CODEGATE 2009 International Hacking Contest</a> ran Ubuntu Intrepid for both the qualifying rounds and the final match.  The host machine was running the 32bit <code>-server</code> kernel, so <a href="http://www.outflux.net/blog/archives/2008/11/21/make-your-bios-love-security/">NX</a> was active (along with all the other <a href="https://wiki.ubuntu.com/CompilerFlags">memory-corruption protections</a>).  From what I can see the compiled challenges were stack-protected and fortified, so the contestants had to work around that as well as the randomized stack, heap, and library locations.  Sounds like it was a fun contest in a real-world situation.  All that&#8217;s left now is for 64bit to become the standard.  And PIE too.  I can&#8217;t wait to hear more.  :)</p>
<blockquote><pre>$ nm cracktris | grep _chk
         U __fprintf_chk@@GLIBC_2.3.4
         U __printf_chk@@GLIBC_2.3.4
         U __sprintf_chk@@GLIBC_2.3.4
         U __stack_chk_fail@@GLIBC_2.4
         U __strcat_chk@@GLIBC_2.3.4
         U __strcpy_chk@@GLIBC_2.3.4
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/04/09/codegate-2009-ran-ubuntu-intrepid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>World Of Goo compiled on Ubuntu</title>
		<link>http://www.outflux.net/blog/archives/2009/02/13/world-of-goo-compiled-on-ubuntu/</link>
		<comments>http://www.outflux.net/blog/archives/2009/02/13/world-of-goo-compiled-on-ubuntu/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 23:44:40 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=181</guid>
		<description><![CDATA[I first played World of Goo on the Wii.  I loved it.  Great stuff, reminded me a little of Lemmings, but way way better.  Today I found out it&#8217;s also available for Linux, and I immediately downloaded it.  I was pleased to see a .deb available and thought I&#8217;d dig into [...]]]></description>
			<content:encoded><![CDATA[<p>I first played <a href="http://worldofgoo.com/">World of Goo</a> on the Wii.  I loved it.  Great stuff, reminded me a little of <a href="http://en.wikipedia.org/wiki/Lemmings_(video_game)">Lemmings</a>, but way way better.  Today I found out it&#8217;s also <a href="http://worldofgoo.com/dl2.php?lk=demo">available for Linux</a>, and I immediately downloaded it.  I was pleased to see a <code>.deb</code> available and thought I&#8217;d dig into the binary a little to see how it was put together.</p>
<p>I&#8217;m hugely excited to see that it looks like the game was built on Ubuntu Intrepid for both the .deb and .tar.gz packages:</p>
<blockquote><p><code>$ strings -a WorldOfGoo.bin | grep -i gcc<br />
...<br />
GCC: (Ubuntu 4.3.2-1ubuntu12) 4.3.2<br />
</code></p></blockquote>
<p>The bundled libraries appear to come from Gentoo:</p>
<blockquote><p><code>$ strings -a libs/libogg.so.0 | grep -i gcc<br />
...<br />
GCC: (GNU) 4.2.3 (Gentoo 4.2.3 p1.0)<br />
</code></p></blockquote>
<p>OpenSSL (and libpng?) from Gentoo seem to have been statically linked into the binary:</p>
<blockquote><p><code>$ strings -a WorldOfGoo<br />
...<br />
GCC: (GNU) 4.2.3 (Gentoo 4.2.3 p1.0)<br />
_x86_AES_encrypt<br />
...<br />
</code></p></blockquote>
<p>What I&#8217;m so very excited about is that third party software producers are using Ubuntu for their releases.  This means they get all the security and code-quality improvements that are <a href="https://wiki.ubuntu.com/CompilerFlags">built into the Ubuntu compiler</a> for free:</p>
<blockquote><p><code>$ objdump -CR WorldOfGoo.bin | grep _chk<br />
...<br />
084043f0 R_386_JUMP_SLOT   __memcpy_chk<br />
</code></p></blockquote>
<p>Many thanks to <a href="http://linuxlock.blogspot.com/2009/02/linux-gets-gooey-on-friday-13th.html">Maks Verver</a> for doing the porting.  I&#8217;m really enjoying the demo.  Also, I can see your devel path!  :)</p>
<blockquote><p><code>$ strings -a WorldOfGoo.bin | grep openssl<br />
OPENSSLDIR: "/home/maks/Projects/wog/libs/openssl-0.9.8j-linux-i386/ssl"<br />
...<br />
</code></p></blockquote>
<p>All this said, it may be that they&#8217;re actually only compiling pieces (like the Open Dynamics Engine, which seems to contain the bulk of the *_chk calls) on Ubuntu (or using .a files from a distro-compiled library that enables hardening only in builds &#8212; RedHat, SuSE), but doing the .deb and .tar.gz project linking on Ubuntu (which is why the compiler name shows up in the resulting binary).  The RPM shows the *_chk functions too &#8212; actually the disassembly is <em>identical</em> between deb and RPM, which would imply that only final linking was done on the native distros but compiled elsewhere.  I&#8217;d love to hear more details if Maks stumbles on this blog.  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/02/13/world-of-goo-compiled-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>debugging hangs in MIMEDefang</title>
		<link>http://www.outflux.net/blog/archives/2009/01/24/debugging-hangs-in-mimedefang/</link>
		<comments>http://www.outflux.net/blog/archives/2009/01/24/debugging-hangs-in-mimedefang/#comments</comments>
		<pubDate>Sat, 24 Jan 2009 23:21:28 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=180</guid>
		<description><![CDATA[I spent a while this morning hunting down the root cause of a 100% CPU MIMEDefang process.  (Turned out to be one specific email triggering one of my custom SpamAssassin rules that seems to get processed really inefficiently.)  I wasn&#8217;t able to find any documentation on how to debug where in MIMEDefang an [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a while this morning hunting down the root cause of a 100% CPU MIMEDefang process.  (Turned out to be one specific email triggering one of my custom SpamAssassin rules that seems to get processed really <a href="http://rt.perl.org/rt3//Public/Bug/Display.html?id=62718">inefficiently</a>.)  I wasn&#8217;t able to find any documentation on how to debug where in MIMEDefang an email was getting stuck, and even jacking up the debugging output of my mimedefang-filter script seemed to imply it was happening late in the filtering process.  After digging through <code>mimedefang.pl</code>, I found a &#8220;status reporting&#8221; subsystem and tracked it back out into configuration in <code>/etc/default/mimedefang</code>:</p>
<blockquote><p><code># Uncomment next line to have busy slaves send status updates to the<br />
# multiplexor.  NOTE: Consumes one extra file descriptor per slave, plus<br />
# a bit of CPU time.<br />
# MX_STATUS_UPDATES=yes<br />
</code></p></blockquote>
<p>Turning this on, and then using &#8220;<code><a href="http://manpages.ubuntu.com/manpages/hardy/man8/md-mx-ctrl.8.html">md-mx-ctrl</a> busyslaves</code>&#8221; (I command I didn&#8217;t know existed until today either) I got to see exactly where it was stuck:</p>
<blockquote><p><code>3 B 13380 (Running SpamAssassin j951iX1t025805)<br />
</code></p></blockquote>
<p>Now I&#8217;m having fun running <code>md-mx-ctl</code> with <code>histo</code>, <code>barstatus</code>, and <code>load</code>.  :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/01/24/debugging-hangs-in-mimedefang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ETOOMANYCERTS</title>
		<link>http://www.outflux.net/blog/archives/2009/01/13/etoomanycerts/</link>
		<comments>http://www.outflux.net/blog/archives/2009/01/13/etoomanycerts/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 06:46:16 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=179</guid>
		<description><![CDATA[After upgrading an Ubuntu mail server from Hardy to Intrepid, two users could no longer connect via SSL to send email though sendmail.  One was using msmtp and the other was using Outlook Express.  The msmtp issue was tracked down as a supposed deficiency in msmtp.  However, this left Outlook, which is [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading an Ubuntu mail server from Hardy to Intrepid, two users could no longer connect via SSL to send email though <code>sendmail</code>.  One was using <code>msmtp</code> and the other was using Outlook Express.  The <code>msmtp</code> issue was <a href="https://bugs.launchpad.net/ubuntu/+source/gnutls13/+bug/292604">tracked down</a> as a supposed deficiency in msmtp.  However, this left Outlook, which is neigh-impossible to debug.  From the <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478191">Debian <code>msmtp</code> bug</a> linked from the Ubuntu bug, it seemed that the root cause was the server sending too much data during the initial connection.  Packet captures of an Outlook connection seemed to back this up: Outlook negotiated STARTTLS fine, and then just never responded to the SSL handshake.</p>
<p>It seems that something (<code>openssl</code>? <code>sendmail</code>?) changed between Hardy and Intrepid so that instead of using the /etc/ssl/certs/ca-certificates.crt file just for verification, its contents were now being sent during the SSL handshake.  (I reduced the number of configured certs with &#8220;<code>sudo dpkg-reconfigure ca-certificates</code>&#8220;, and checked on the size of the handshake with &#8220;<code>openssl s_client -connect server:port | wc -l</code>&#8220;.)  It spewed 143 certs sent at every connection.  Unsurprisingly, it seems some clients were choking on it (I would like to note that Thunderbird behaved correctly).</p>
<p>In the end, I configured my sendmail&#8217;s CAfile (&#8221;confCACERT&#8221;) to aim at just a single CA (the CA used to sign the server&#8217;s SSL key), and that fixed both msmtp and Outlook.  How fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/01/13/etoomanycerts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>happy new year, RIP md5</title>
		<link>http://www.outflux.net/blog/archives/2009/01/01/happy-new-year-rip-md5/</link>
		<comments>http://www.outflux.net/blog/archives/2009/01/01/happy-new-year-rip-md5/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 18:59:36 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=177</guid>
		<description><![CDATA[Welcome to 2009!  Really, seriously, everyone can stop using MD5 now.  However, be sure not to overreact.  The forged CA research is a great read, but there&#8217;s no need to break existing certs.  For a calm reaction, please read this.
]]></description>
			<content:encoded><![CDATA[<p>Welcome to 2009!  Really, seriously, everyone can stop using MD5 now.  However, be sure not to overreact.  The <a href="http://www.win.tue.nl/hashclash/rogue-ca/">forged CA research</a> is a great read, but there&#8217;s no need to break existing certs.  For a calm reaction, please read <a href="http://broadcast.oreilly.com/2009/01/new-pki-problem-resolved.html">this</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2009/01/01/happy-new-year-rip-md5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bogosec run on intrepid main</title>
		<link>http://www.outflux.net/blog/archives/2008/12/03/bogosec-run-on-intrepid-main/</link>
		<comments>http://www.outflux.net/blog/archives/2008/12/03/bogosec-run-on-intrepid-main/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 18:16:31 +0000</pubDate>
		<dc:creator>kees</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu-Server]]></category>

		<guid isPermaLink="false">http://www.outflux.net/blog/?p=176</guid>
		<description><![CDATA[Care of Mike Owens and Dustin Kirkland, bogosec has been uploaded to Jaunty (in the NEW queue at the moment).  It is a source-code analyzer framework with plugins for lintian, rats, and flawfinder.  Out of curiousity, I ran it on all of Intrepid main.  Highest 5 scores were:

0.717338929043293 lsscsi
0.612729234088457 nevow
0.561151781356762 powertop
0.431034482758621 language-pack-tk-base
0.431034482758621 [...]]]></description>
			<content:encoded><![CDATA[<p>Care of Mike Owens and <a href="http://blog.dustinkirkland.com/search/label/Ubuntu">Dustin Kirkland</a>, <a href="https://launchpad.net/ubuntu/+source/bogosec">bogosec</a> has been uploaded to Jaunty (in the <a href="https://launchpad.net/ubuntu/jaunty/+queue?queue_state=0&#038;queue_text=bogosec">NEW queue</a> at the moment).  It is a source-code analyzer framework with plugins for <a href="http://lintian.debian.org/">lintian</a>, <a href="http://www.fortify.com/security-resources/rats.jsp">rats</a>, and <a href="http://www.dwheeler.com/flawfinder/">flawfinder</a>.  Out of curiousity, I <a href="http://people.ubuntu.com/~kees/bogosec/">ran it</a> on all of Intrepid main.  Highest 5 <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/scores.txt">scores</a> were:</p>
<ol>
<li>0.717338929043293 <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/lsscsi">lsscsi</a></li>
<li>0.612729234088457 <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/nevow">nevow</a></li>
<li>0.561151781356762 <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/powertop">powertop</a></li>
<li>0.431034482758621 <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/language-pack-tk-base">language-pack-tk-base</a></li>
<li>0.431034482758621 <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/language-pack-se-base">language-pack-se-base</a></li>
</ol>
<p>As Dustin reminded me, bogosec seems biased against smaller code bases.  In the case of the lang packs, the score is entirely from lintian.  Both lsscsi and powertop deal mostly with input from kernel strings, so while they scored highly, I doubt either is actually vulnerable to very much.  I haven&#8217;t looked at nevow yet.  Also, both rats and flawfinder yell about things that are mitigated by <a href="https://wiki.ubuntu.com/CompilerFlags">compiler flags</a> (e.g. -D_FORTIFY_SOURCE=2) so those warnings are less interesting too.</p>
<p>Really, this all boils down to &#8220;we need better code analyzers&#8221;.  The best tool will be one that predicts CVE counts (I would expect the <a href="http://people.ubuntu.com/~kees/bogosec/intrepid-main/linux">Linux kernel</a> to be at the top, since it has the all-time highest number of <a href="http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=linux+kernel">CVEs filed against it</a>).</p>
<p>To get closer to reality, I think just doing a normal package build and scanning for stderr output would be meaningful (gcc has plenty of built-in checks already).  Steve Beattie suggested writing a plugin for <a href="http://www.kernel.org/pub/software/devel/sparse/">sparse</a>, too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.outflux.net/blog/archives/2008/12/03/bogosec-run-on-intrepid-main/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
