Search Results: "ed"

21 November 2011

Sune Vuorela: Those small nice tools we all write

Many of us out there writes small tools to just solve a simple task that you need. Here, I will present a tool I needed last night. I have a small job doing a wordpress site for some people, and I needed a image with the site title in a font matching some specific criteria (like a double story lowercase A and a small serif on lowercase L, while in general being a Sans Serif type). So what I needed was a application that let me write a word or a phrase, and see it written with all available fonts on the system. So, it took a little more than a effective hour and 120 lines of code to come up with this: Click to see image And if anyone cares, I have pushed the sources to git.kde.org. I m sure many of you also have various such small apps. Let s see them. That s also you Eike and your svgtoy app :) Another thing I learned from this app is that the ukij fonts targetted the Uyghyr language actually is very interesting also for western europeans.

Craig Small: New procps 3.3.0 for Debian

Coming soon after the upstream procps 3.3.0 being released, the debian packages have been uploaded tonight. The Debian packages have had the added benefit of being a day late by having a tiny 2 line patch to stop pgrep from crashing. One regression that is on purpose, watch is currently not 8-bit clean again until I can sort out how to get the linking right with the new build process. Testing Systems The embarrassing problem with pgrep did start a discussion about testing, especially regression testing. I ve recently started using unit testing in my python programs and love the level of assurance those tests give me that I haven t broken anything (to a degree anyhow). I d really like to be able to type make test and have each of the programs run through a series of tests. The problem with packages like procps (psmisc too) is that you really need to test the entire program, not just a stub, and that the program needs access to a know level of /proc. The only thing I have seen that is even remotely what is needed is the bunch of scripts that coreutils uses which creates dummy files and directories to operate the commands on. I expect we could do something similar with some scripts that create a known process but if anyone has a better idea about how to test a command line program let me know.

Petter Reinholdtsen: Automatically upgrading server firmware on Dell PowerEdge

At work we have heaps of servers. I believe the total count is around 1000 at the moment. To be able to get help from the vendors when something go wrong, we want to keep the firmware on the servers up to date. If the firmware isn't the latest and greatest, the vendors typically refuse to start debugging any problems until the firmware is upgraded. So before every reboot, we want to upgrade the firmware, and we would really like everyone handling servers at the university to do this themselves when they plan to reboot a machine. For that to happen we at the unix server admin group need to provide the tools to do so. To make firmware upgrading easier, I am working on a script to fetch and install the latest firmware for the servers we got. Most of our hardware are from Dell and HP, so I have focused on these servers so far. This blog post is about the Dell part. On the Dell FTP site I was lucky enough to find an XML file with firmware information for all 11th generation servers, listing which firmware should be used on a given model and where on the FTP site I can find it. Using a simple perl XML parser I can then download the shell scripts Dell provides to do firmware upgrades from within Linux and reboot when all the firmware is primed and ready to be activated on the first reboot. This is the Dell related fragment of the perl code I am working on. Are there anyone working on similar tools for firmware upgrading all servers at a site? Please get in touch and lets share resources.
#!/usr/bin/perl
use strict;
use warnings;
use File::Temp qw(tempdir);
BEGIN  
    # Install needed RHEL packages if missing
    my %rhelmodules = (
        'XML::Simple' => 'perl-XML-Simple',
        );
    for my $module (keys %rhelmodules)  
        eval "use $module;";
        if ($@)  
            my $pkg = $rhelmodules $module ;
            system("yum install -y $pkg");
            eval "use $module;";
         
     
 
my $errorsto = 'pere@hungry.com';
upgrade_dell();
exit 0;
sub run_firmware_script  
    my ($opts, $script) = @_;
    unless ($script)  
        print STDERR "fail: missing script name\n";
        exit 1
     
    print STDERR "Running $script\n\n";
    if (0 == system("sh $script $opts"))   # FIXME correct exit code handling
        print STDERR "success: firmware script ran succcessfully\n";
      else  
        print STDERR "fail: firmware script returned error\n";
     
 
sub run_firmware_scripts  
    my ($opts, @dirs) = @_;
    # Run firmware packages
    for my $dir (@dirs)  
        print STDERR "info: Running scripts in $dir\n";
        opendir(my $dh, $dir) or die "Unable to open directory $dir: $!";
        while (my $s = readdir $dh)  
            next if $s =~ m/^\.\.?/;
            run_firmware_script($opts, "$dir/$s");
         
        closedir $dh;
     
 
sub download  
    my $url = shift;
    print STDERR "info: Downloading $url\n";
    system("wget --quiet \"$url\"");
 
sub upgrade_dell  
    my @dirs;
    my $product =  dmidecode -s system-product-name ;
    chomp $product;
    if ($product =~ m/PowerEdge/)  
        # on RHEL, these pacakges are needed by the firwmare upgrade scripts
        system('yum install -y compat-libstdc++-33.i686 libstdc++.i686 libxml2.i686 procmail');
        my $tmpdir = tempdir(
            CLEANUP => 1
            );
        chdir($tmpdir);
        fetch_dell_fw('catalog/Catalog.xml.gz');
        system('gunzip Catalog.xml.gz');
        my @paths = fetch_dell_fw_list('Catalog.xml');
        # -q is quiet, disabling interactivity and reducing console output
        my $fwopts = "-q";
        if (@paths)  
            for my $url (@paths)  
                fetch_dell_fw($url);
             
            run_firmware_scripts($fwopts, $tmpdir);
          else  
            print STDERR "error: Unsupported Dell model '$product'.\n";
            print STDERR "error: Please report to $errorsto.\n";
         
        chdir('/');
      else  
        print STDERR "error: Unsupported Dell model '$product'.\n";
        print STDERR "error: Please report to $errorsto.\n";
     
 
sub fetch_dell_fw  
    my $path = shift;
    my $url = "ftp://ftp.us.dell.com/$path";
    download($url);
 
# Using ftp://ftp.us.dell.com/catalog/Catalog.xml.gz, figure out which
# firmware packages to download from Dell.  Only work for Linux
# machines and 11th generation Dell servers.
sub fetch_dell_fw_list  
    my $filename = shift;
    my $product =  dmidecode -s system-product-name ;
    chomp $product;
    my ($mybrand, $mymodel) = split(/\s+/, $product);
    print STDERR "Finding firmware bundles for $mybrand $mymodel\n";
    my $xml = XMLin($filename);
    my @paths;
    for my $bundle (@ $xml-> SoftwareBundle )  
        my $brand = $bundle-> TargetSystems -> Brand -> Display -> content ;
        my $model = $bundle-> TargetSystems -> Brand -> Model -> Display -> content ;
        my $oscode;
        if ("ARRAY" eq ref $bundle-> TargetOSes -> OperatingSystem )  
            $oscode = $bundle-> TargetOSes -> OperatingSystem [0]-> osCode ;
          else  
            $oscode = $bundle-> TargetOSes -> OperatingSystem -> osCode ;
         
        if ($mybrand eq $brand && $mymodel eq $model && "LIN" eq $oscode)
         
            @paths = map   $_-> path    @ $bundle-> Contents -> Package ;
         
     
    for my $component (@ $xml-> SoftwareComponent )  
        my $componenttype = $component-> ComponentType -> value ;
        # Drop application packages, only firmware and BIOS
        next if 'APAC' eq $componenttype;
        my $cpath = $component-> path ;
        for my $path (@paths)  
            if ($cpath =~ m%/$path$%)  
                push(@paths, $cpath);
             
         
     
    return @paths;
 
The code is only tested on RedHat Enterprise Linux, but I suspect it could work on other platforms with some tweaking. Anyone know a index like Catalog.xml is available from HP for HP servers? At the moment I maintain a similar list manually and it is quickly getting outdated.

Russell Coker: Galaxy S vs Xperia X10 and Android Network Access

Galaxy S Review I ve just been given an indefinite loan of a Samsung Galaxy S which is more useful than the Sony Ericsson Xperia X10 that I own. I think that the main benefit is that it runs Android 2.2 instead of Android 2.1 on the Xperia. 2.2 is what gives it USB tethering support without extra software (something I haven t tested yet but will use a lot if it works correctly) and Wifi AP support. Both phones are about the same size, the Galaxy S has slightly more RAM (reported as 304M vs 280M which doesn t really matter) and a lot more main storage (1.87G vs 465M usable after the OS is loaded). The main down-sides of the Galaxy S is that it lacks a flash . I m not aware of any phone camera having a proper flash, but the limited LED flash is useful for taking pictures at times and there are a variety of programs that can turn it on for use as a torch. Also I wonder whether the Samsung people actually test their phones in real use or whether they just build them to spec. When you read the specs it sounds nice to have a phone that s only 9.9mm thick (apart from the bulge at the bottom), but that makes it really difficult to hold. The Xperia X10 is 13mm thick and isn t as slick so you are much less likely to drop it. I sometimes wonder whether phone companies are designing their products to be broken so that they can sell replacements. Three Networking Sucks My parents use 3G broadband from Three as their only connection to the Internet, this is fast enough for viewing Youtube on occasion and generally works well for them. However whenever I try to transfer any data to their system which has integrity checks it turns out to be corrupted. About every megabyte of data transferred has a corrupt packet that has a matching checksum presumably it s a bug in Three s network. Because Three are desperate for customers they have given me a free 6 month subscription to a data SIM [1]. I ve been using that SIM with my Galaxy S and found the same data corruption problem and I ve reproduced it in many places around Melbourne so this isn t just one unreliable cell tower, it s something broken in the core of the Three network. The obvious solution to this is to use a VPN so the corrupt packets will be dropped. So I set up a PPTP VPN only to discover that it seems impossible to make the default route be via the VPN, there has been a bug report about this since 2009 the iPhone allows configuring whether Internet traffic should go via the VPN, it can t be that hard [2]. There is an option to use a proxy for web access, but when I tried that on Android 2.1 it only worked for the system web browser not for things like the Android Market. But there is no option for configuring a proxy for use when the VPN is active, so it doesn t seem likely that I could run a proxy on the VPN network and direct all traffic to it. Due to corruption on the Three network and the inability to get a VPN working correctly it seems that I can t use the Three SIM. Android isn t Really Free Software While Android implementations generally stick to the GPL and other free software licenses that are involved they seem to be a poor example of providing freedom to users. My Xperia X10 is running Android 2.1 because Sony-Ericsson has locked the boot loader so I can t install a newer kernel. They don t care enough to release a new version this is stupid of them because it means that I am much less likely to recommend their products. If Sony-Ericsson releases a newer Android release then it will be a total OS reinstall, unlike the way I can upgrade a Debian system an application at a time. I can t install new packages that replace system packages, so the Email and SMS programs that I ve installed sit along side the ones that came with the system. Periodically the unwanted SMS and Email programs show up. I can t make my Android phones perform basic networking tasks that I ve done on Linux systems since the early 90 s. Hiding the complexity from the newbies is OK, but they need to make the full capabilities of the system available to experts. It seems to me that Android effectively gives the majority of users no more freedom than the iPhone does. Even for the small minority of us who are technically capable of rooting phones and installing CyanogenMod etc it s often limited by technical measures and the amount of time required. Update: Philipp Kern pointed out that his Galaxy S has a front facing camera. I have checked my phone and discovered that it has one too. When I published this post I criticised the Galaxy S for not having a front facing camera for video-calls based on a misunderstanding of the Wikipedia page (which says that SOME models lack it) and not testing it. Thanks for the correction Philipp and sorry for publishing wrong data.

Benjamin Mako Hill: Iron Blogger

I want to blog frequently but usually don't seem to find the time for it. I'm not above tying myself to the mast if it means blogging more. Iron Blogger is a blogging and drinking club based on this premise. The rules are pretty simple: Nelson Elhage ran the original Iron Blogger for about a year before the effort ran out of steam. I've started a new instance with a couple people from the previous group and a bunch of folks from Berkman, MIT, and beyond. If you live in Boston and want to join, there are still a couple of spots available. I'm going to cap the current group, at least temporarily, at about 30 people because I think that's the maximum we'll fit into a local pub. Look over the site and send me an email if you're interested. If you don't live in Boston but want to organize your own Iron Blogger, you can use the software in Nelson's git repository (or my branch) to automate nearly the whole process of tracking posts, generating reports, and updating the ledger of debts.

Paul Wise: Debian/Ubuntu games team meeting #6

The Debian/Ubuntu games team is organizing another meeting, if you're into developing and/or packaging of games, or just generally curious about games in Debian/Ubuntu, you should join! It will be held next Saturday, on the 26th of November, in the #debian-games channel on irc.debian.org (also know as irc.oftc.net). More information is available on the meeting wiki page. The agenda starts off with the usual round of introductions, so if you're new to the team, say hi! Then we'll be going through the action items from the last meeting, including work on the Debian Games LiveCD, and what's up with the /usr/games/ path anyways? Next we'll be moving onto how the games team is faring in terms of members: are new recruits finding it comfortable, should we advertise more? Next up it's the squeeky penguin: Wheezy is somewhere in the not-completely-distant future, how does that affect the games team, should we be scuffling to get specific tasks done? Then onto the recurring question of sponsoring, and how to improve it, should we be utilising DebExpo more? What about our favourite PET? Lastly, PlayDeb is doing some really neat stuff, would it make sense for our team to push some changes to PlayDeb? Would it make sense for PlayDeb to push changes to Debian Games? Hopes are for a good discussion, and a merry time, hope to see you all there! (This text provided by Martin Erik Werner)

20 November 2011

Gregor Herrmann: RC bugs 2011/46

as expected this week was characterised by fixing bugs around the perl 5.14 transition. besides that I've also uploaded a couple of NMUs with patches kindly provided in the BTS by some tireless bug fixers.

Dirk Eddelbuettel: RcppArmadillo 0.2.30 (and 0.2.29)

A few days ago, Conrad Sanderson released the first pre-release version of what will be Armadillo 2.4.*, giving it the 2.3.91 release handle. We folded this into RcppArmadillo release 0.2.30, with Romain making a few adjustments to our template structure to accomodate Conrad's underlying changes in Armadillo itself. Armadillo is a wonderfully expressive (thanks to clever modern template programming), powerful yet simple-to-use C++ library for linear algebra, making expressions in C++ as easy as writing in Matlab or R. By deploying our seamless Rcpp glue between R and C++, RcppArmadillo brings this nice C++ library to R users. The CRAN page for RcppArmadillo now lists ten packages using the RcppArmadillo package. There was also an earlier bug-fix release 0.2.29 which I had not blogged about separately. The NEWS entries summarising the changes for both are below:
0.2.30  2011-11-19
    o   Upgraded to Armadillo test release 2.3.91 "Loco Lounge Lizard (Beta 1)"
          * added shorter forms of transposes: .t() and .st()
          * added optional use of 64 bit indices, allowing matrices to have
            more than 4 billion elements
          * added experimental support for C++11 initialiser lists
          * faster pinv()
          * faster inplace transpose
          * bugfixes for handling expressions with aliasing and submatrices
          * refactored code to eliminate warnings when using the Clang C++
            compiler
          * .print_trans() and .raw_print_trans() are deprecated 
0.2.29  2011-09-01
    o   Upgraded to Armadillo release 2.2.3
          * Release fixes a speed issue in the as_scalar() function.
Courtesy of CRANberries, there are also diffstat reports for 0.2.30 relative to 0.2.29 and for 0.2.29 relative to 0.2.28. As always, more detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the R-Forge page.

Craig Small: procps-ng 3.3.0 Released

Tonight procps-ng, a fork of procps by developers from Debian, Fedora and SuSE was released. The main goal of the team for this release was to reduce the number of patches we all carry in our respective distributions and learn from each other. As an added bonus, we had one of the original authors of top, Jim, join the team and greatly enhance top. While the upstream version is now released, the debian package is not quite ready to go as it involves removing a lot of patches and adjusting some others. The build system is also now a reasonably standard (but different to previous) setup that means the packing scripts need adjusting. The best place to find out what is different is the procps NEWS file. The source code is available from Gitorious at https://gitorious.org/procps

Michael Casadevall: Possible GLX Bug in Ubuntu; feedback needed (affects Intel video cards 2D/3D acceleration)

So I've been recently screwing around with VirtualBox on a personal project, and I ran into an issue with not being able to enable 2D/3D acceleration on Ubuntu 11.10. After quite a bit of debugging and forum searching, the problem was that the NVIDIA GLX driver was being loaded instead of the standard MESA one, preventing any video acceleration from properly working on my Intel based video card.

I just recently reinstalled Kubuntu on this laptop, and since its a fairly stock install at the moment, I suspect that this is a general (K)ubuntu bug, and not something related to me screwing around with my system. In addition, since I switched to using Kubuntu full time, this is the first time I've seen transparency and other desktop effects, and system performance has improved dramatically. While I can't say for certian, I suspect that my system was also affected on its previous install. Part of the issue may be related to what packages are seeded per flavour, so this bug may only affect those who installed Kubuntu over say Xubuntu or Ubuntu; without more information, its impossible to say.

This is where you can help; if you are running any flavor of Ubuntu with an Intel based video card, you might be affected by this too.

Here's how to check; open a terminal, and type:

mcasadevall@daybreak:/var/log$ cat /var/log/Xorg.0.log

then find the section where the glx module is loaded. It looks something like this:

[236901.570] (II) LoadModule: "glx"
[236901.571] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[236901.578] (II) Module glx: vendor="X.Org Foundation"
[236901.578] compiled for 1.10.4, module version = 1.0.0
[236901.578] ABI class: X.Org Server Extension, version 5.0

(this is on a machine where the Intel acceleration is properly working).

If it says 'ATi' or 'NVIDIA', you've run into the same issue I have. So dear readers, I ask that if you've had any issue with graphic performance, gaming, or simple UI lag and have an Intel video card, please post a comment with you video card, what flavor of Ubuntu you have installed, and the glx section of Xorg.0.log. If I get a few reports that confirm this, I'll file a proper bug in Launchpad, and then work to get this fixed.

Ben Hutchings: GNOME won't let you watch your videos in peace

Screensaver control on the Linux desktop is a total mess, but the xdg-screensaver command provided an interim cross-desktop solution by detecting and using the appropriate underlying interfaces. For GNOME, it depends on the gnome-screensaver-command --poke option, but that has been broken and then removed in favour of the cross-desktop D-Bus API org.freedesktop.ScreenSaver another GNOME-specific API which can't practically be used by xdg-screensaver. What's more, switching to the new API seems to have introduced various bugs in GNOME's own video player, Totem, such that it often failed to inhibit the screensaver in GNOME 2.32 and 3.0. Apparently everything is wonderful again in 3.2; here's hoping. (In case anyone asks where my bug report on the totem package is, I already looked at the bug list and it's clear that there's no point.) Updated: Well I said the GNOME Session D-Bus API couldn't practically be used in xdg-screensaver, but then set out to prove myself wrong. And with the aid of Perl, I may have succeeded.

19 November 2011

Miriam Ruiz: 3D Puzzle Game: Phlipple

You might remember the action puzzle game Zaz. Well, we now have a new puzzle game from the same author (Remigiusz mal1ce Dybka), called Phlipple. The goal of the game is to reduce a 3D shape to a single square in each level, removing squares by flipping edges around, like you would do in a cardboard box. The Free/Open source version of the game, including 50 levels, is now available in Debian, in case that you want to give it a chance. You can watch the promo video in Youtube if you want to have a better idea of what the game looks like. I hope that you like it, I do :) Here are some screenshots of the game: Screenshot of the gameScreenshot of the gameScreenshot of the game

Dominique Dumont: Debian SDL packaging team revival

Hello Most SDL packages are outdated, people are complaining in the BTS, and the team is mostly inactive. That s bad news for my project. What can I do ? Well, it s Debian project, I just have to step up. Thanks to Sam Hocevar, I m now admin on Debian Alioth SDL packaging project. I d like to revive the team. (Note that I don t have the bandwidth to be the team all by myself). Here are the first steps I plan (mostly inspired by the way Debian-perl team is working): Now, there are some ground rules I wish to push forward: If you don t agree with the above points, now is the time to say it. Feel free to join by:
  1. Creating an account on Alioth
  2. request to join sdl-team
  3. Last but not least, send a short introduction mail to pkg-sdl-maintainers AT lists.alioth.debian.org so we can know each other.
See you soon :-)

18 November 2011

Matthew Garrett: Clarifying the "secure boot attack"

Yesterday I wrote about an alleged attack on the Windows 8 secure boot implementation. As I later clarified, it turns out that the story was, to put it charitably, entirely wrong. The attack is a boot kit targeted towards BIOS-based boots. It lives in the MBR. It'll never be executed on any UEFI systems, let alone secure boot ones. In fact, this is precisely the kind of attack that secure boot is intended to protect against. So, context.

The MBR contains code that's executed by the BIOS at boot time. This code is unverifiable - it's permitted to have arbitrary functionality. There's only 440 bytes, but that's enough to jump to somewhere else and read code from elsewhere. There's no way for the BIOS to know that this code is malicious. And one thing this code can obviously do is load the normal boot code and modify it to behave differently. Any self-validation code in the loader can be patched out at this point. The modified loader will then load the kernel, and potentially also modify it. At this point, you've lost. Any attempts to validate the code can be redirected to the original code and so everything will look fine, up until the point where the user runs a specific application and suddenly your kernel is sending all your keystrokes over UDP to someone in Nigeria.

These attacks exist now. They're in the wild. In a normal UEFI world you'd do the same thing by just replacing the UEFI bootloader. But with secure boot you'll be able to validate that the bootloader is appropriately signed and if someone's modified it you'll drop into some remediation mode that recovers your files, from install media if necessary.

Obviously, this protection is based on all the components of secure boot (ie, everything that runs before ExitBootServices() is called) being perfect. As I said, if any of them accept untrusted input and misinterpret it in such a way that they can be tricked into running arbitrary code, you'll still have problems. But when discussing the pros and cons of secure boot, it's important to make sure that we're talking about reality rather than making provably false assertions.

comment count unavailable comments

Alexander Reichle-Schmehl: Release Critical Bug report for Week 46

The bug webinterface of the Ultimate Debian Database currently knows about the following release critical bugs:
In Total:1812
Affecting Wheezy:1161
Wheezy only:163
Remaining to be fixed in Wheezy:998
Of these 998 bugs, the following tags are set:
Pending in Wheezy:47
Patched in Wheezy:191
Duplicates in Wheezy:47
Can be fixed in a security Update:31
Contrib or non-free in Wheezy:16
Claimed in Wheezy:0
Delayed in Wheezy:4
Otherwise fixed in Wheezy:89
Ignoring all the above (multiple tags possible) 631 bugs need to be fixed by Debian Contributors to get Debian 7.0 Wheezy released. However, with the view of the Release Managers, 1053 need to be dealt with for the release to happen. Please see Interpreting the release critical bug statistics for an explanation of the different numbers.

Meike Reichle: Reminder: BSP in Hildesheim, Germany, 2-4 Dec 2011

We still have some free spaces in the Hildesheim BSP, which is scheduled in two weeks. (Friday 2nd to Sunday 4th of December). If you need any additional information or want to come by please check the wiki page.

Pau Garcia i Quiles: FOSDEM 2012 CrossDesktop DevRoom Call for Talks

FOSDEM is one of the largest gatherings of Free Software contributors in the world and happens each February in Brussels (Belgium). One of the developer rooms will be the CrossDesktop DevRoom, which will host Desktop-related talks. We are now inviting proposals for talks about Free/Libre/Open-source Software on the topics of Desktop development, Desktop applications and interoperativity amongst Desktop Environments. This is a unique opportunity to show novel ideas and developments to a wide technical audience. Topics accepted include, but are not limited to: Enlightenment, Gnome, KDE, XFCE, Windows, Mac OS X, general desktop matters, applications that enhance desktops and web (when related to desktop). Talks can be very specific, such as developing mobile applications with Qt Quick; or as general as predictions for the fusion of Desktop and web in 5 years time. Topics that are of interest to the users and developers of all desktop environments are especially welcome. The FOSDEM 2011 schedule might give you some inspiration. Please include the following information when submitting a proposal: your name, the title of your talk (please be descriptive, as titles will be listed with around 250 from other projects) and a short abstract of one or two paragraphs. The deadline for submissions is December 20th 2011. FOSDEM will be held on the weekend of 4-5 February 2012. Please submit your proposals to crossdesktop-devroom@lists.fosdem.org Also, if you are attending FOSDEM 2012, please add yourself to the KDE community wiki page so that we organize better. We need volunteers for the booth!

17 November 2011

Alastair McKinstry: Never Again

Never Again I grew up in the era of old men at Church, wearing poppies and their medals this time of year, in commemoration of their friends and neighbours who had died in the Great War. On the 11 November, they would remember the Armistice, those who had died, and with silence respect the promise that it be the War to End All Wars. Because for them this was not an ironical phrase, but a promise betrayed; that Never Again should this happen. As the last of those men have died, the commemorations of the Armistice have been insidiously hijacked, and using 'honouring our troops', those who never had to see their brothers drown in the mud at Passchendale have moved from 'Never Again' to 'Always Ready', always ready to fight, always read to go to war. As a pacifist I have always felt uneasy about war commemorations. But it is all too late that I realise why I never really had a problem with those who fought in the war, and never talked of its horrors. Its those for whom the commemoration is a time for fine speeches, then back to the office to prepare for the next war that I despise. Never again.

Matthew Garrett: Attacks on secure boot

This is interesting. It's obviously lacking in details yet, but it does highlight one weakness of secure boot. The security for secure boot is all rooted in the firmware - there's no external measurement to validate that everything functioned as expected. That means that if you can cause any trusted component to execute arbitrary code then you've won. So, what reads arbitrary user data? The most obvious components are any driver that binds to user-controlled hardware, any filesystem driver that reads user-provided filesystems and any signed bootloader that reads user-configured data. A USB drive could potentially trigger a bug in the USB stack and run arbitrary code. A malformed FAT filesystem could potentially trigger a bug in the FAT driver and run arbitrary code. A malformed bootloader configuration file or kernel could potentially trigger a bug in the bootloader and run arbitrary code. It may even be possible to find bugs in the PE-COFF binary loader. And once you have the ability to run arbitrary code, you can replace all the EFI entry points and convince the OS that everything is fine anyway.

None of this should be surprising. Secure boot is predicated upon the firmware only executing trusted material until the OS handoff. If you can sidestep that restriction then the entire chain of trust falls down. We're talking about a large body of code that was written without the assumption that it would have to be resistant to sustained attack, and which has now been put in a context where people are actively trying to break it. Bugs are pretty inevitable. I'd expect a lot of work to be done on firmware implementations between now and Windows 8 ship date.

(Update: It's probably worth pointing out that although Ars talk about it defeating secure boot, the primary sources don't seem to mention secure boot at all. Windows 8 will boot without secure boot, so it's possible that this attack merely handles the non-secure boot case)

(Further update: It turns out to be a purely BIOS based attack. In other words, it's an example of the kind of thing that secure boot is intended to prevent, not any kind of compromise of a secure boot implementation)

comment count unavailable comments

Matthew Garrett: GPT disks in a BIOS world

Starting with Fedora 16 we're installing using GPT disklabels by default, even on BIOS-based systems. This is worth noting because most BIOSes have absolutely no idea what GPT is, which you'd think would create some problems. And, unsurprisingly, it does. Shock. But let's have an overview.

GPT, or GUID Partition Table, is part of the UEFI specification. It defines a partition table format that allows up to 128 partitions per disk, with 64 bit start and end values allowing partitions up to 9.4ZB (assuming 512 byte blocks). This is great, because the existing MBR partitioning format only allows up to 2.2TB when using 512 byte blocks. But most BIOSes (and most older operating systems) don't understand GPT, so plugging in a GPT-partitioned disk would result in the system believing that the drive was uninitialised. This is avoided by specifying a protective MBR. This is a valid MBR partition table with a single partition covering the entire disk (or the first 2.2TB of the disk if it's larger than that) and the partition type set to 0xee ("GPT Protective"). GPT-unaware BIOSes and operating systems will see a partition they don't understand and simply ignore it.

But how do we boot a GPT-labelled disk with a protective MBR on a system that doesn't understand GPT? The key here is that BIOS is pretty dumb. Typically a BIOS will see a disk and just attempt to execute the code in the first sector. This MBR code knows how to do the rest of the boot, including parsing the partition table if necessary. The BIOS doesn't need to care at all.

Of course, some BIOSes choose to care. We've seen a small number of machines that, when exposed to a GPT disk, refuse to boot because they parse the MBR partition map and don't like what they see. This is typically accompanied by a message along the lines of "No operating system found". What we've found is that they're looking for a partition marked with the bootable flag, and if no partitions are marked bootable they assume that there's no OS. This is in contrast to the traditional use of the flag, which is merely a hint to the MBR as to which partition boot code it should execute.

So, should we set that flag? The UEFI specification specifically forbids it - table 15 states that the BootIndicator byte must be set to 0. Once again we're left in an unfortunate position where the specification and reality collide in an awkward way.

If this happens to you after a Fedora 16 install, you have two choices. The first is to reinstall with the "nogpt" boot argument. The installer will then set up a traditional MBR partition table. The second is to boot off a live CD and run fdisk against the boot disk. It'll give a bunch of scary warnings. Ignore them. Hit "a", then "1", then "w" to write it to disk. Things ought to work then. We'll figure out something better for F17.

comment count unavailable comments

Next.

Previous.