Steve Kemp: It's a wonderful life
Today, here in the UK, the date is 11/12/13.
Today, here in Edinburgh, I've already promised I will make no more than two jokes, ever, about "owning a wife". I will save them for suitable occasions.
Today, here in the UK, the date is 11/12/13.
Today, here in Edinburgh, I've already promised I will make no more than two jokes, ever, about "owning a wife". I will save them for suitable occasions.
For the fifth year in a row the fearless WebKitGTK+ hackers have gathered in A Coru a to bring GNOME and the web closer. Igalia has organized and hosted it as usual, welcoming a record 30 people to its office. The GNOME foundation has sponsored my trip allowing me to fly the cool 18 seats propeller airplane from Lisbon to A Coru a, which is a nice adventure, and have pulpo a feira for dinner, which I simply love! That in addition to enjoying the company of so many great hackers.
The goals for the hackfest have been ambitious, as usual, but we made good headway on them. Web the browser (AKA Epiphany) has seen a ton of little improvements, with Carlos splitting the shell search provider to a separate binary, which allowed us to remove some hacks from the session management code from the browser. It also makes testing changes to Web more convenient again. Jon McCan has been pounding at Web s UI making it more sleek, with tabs that expand to make better use of available horizontal space in the tab bar, new dialogs for preferences, cookies and password handling. I have made my tiny contribution by making it not keep tabs that were created just for what turned out to be a download around. For this last day of hackfest I plan to also fix an issue with text encoding detection and help track down a hang that happens upon page load.
Martin Robinson and myself have as usual dived into the more disgusting and wide-reaching maintainership tasks that we have lots of trouble pushing forward on our day-to-day lives. Porting our build system to CMake has been one of these long-term goals, not because we love CMake (we don t) or because we hate autotools (we do), but because it should make people s lives easier when adding new files to the build, and should also make our build less hacky and quicker it is sad to see how slow our build can be when compared to something like Chromium, and we think a big part of the problem lies on how complex and dumb autotools and make can be. We have picked up a few of our old branches, brought them up-to-date and landed, which now lets us build the main WebKit2GTK+ library through cmake in trunk. This is an important first step, but there s plenty to do.
Under the hood, Dan Winship has been pushing HTTP2 support for libsoup forward, with a dead-tree version of the spec by his side. He is refactoring libsoup internals to accomodate the new code paths. Still on the HTTP front, I have been updating soup s MIME type sniffing support to match the newest living specification, which includes specification for several new types and a new security feature introduced by Internet Explorer and later adopted by other browsers. The huge task of preparing the ground for a one process per tab (or other kinds of process separation, this will still be topic for discussion for a while) has been pushed forward by several hackers, with Carlos Garcia and Andy Wingo leading the charge.
Other than that I have been putting in some more work on improving the integration of the new Web Inspector with WebKitGTK+. Carlos has reviewed the patch to allow attaching the inspector to the right side of the window, but we have decided to split it in two, one providing the functionality and one the API that will allow browsers to customize how that is done. There s a lot of work to be done here, I plan to land at least this first patch durign the hackfest. I have also fought one more battle in the never-ending User-Agent sniffing war, in which we cannot win, it looks like.
I am very happy to be here for the fifth year in a row, and I hope we will be meeting here for many more years to come! Thanks a lot to Igalia for sponsoring and hosting the hackfest, and to the GNOME foundation for making it possible for me to attend! See you in 2014!

Just a trivial fact: every polyhedron that is used in linear programming is
convex, that is !!mathjaxbegin-i!! QXggXGxlcSBi
!!mathjaxend-i!! is convex, for a matrix !!mathjaxbegin-i!! QQ==
!!mathjaxend-i!! and a (column)
vector !!mathjaxbegin-i!! Yg==
!!mathjaxend-i!!.
Proof: Take any !!mathjaxbegin-i!! eCcsIHgnJw==
!!mathjaxend-i!! that satisfy the system of inequalities !!mathjaxbegin-i!! QXggXGxlcSBi
!!mathjaxend-i!!.
Then, for !!mathjaxbegin-i!! MCBcbGVxIFxsYW1iZGEgXGxlcSAx
!!mathjaxend-i!!, we have that !!mathjaxbegin-i!! XGxhbWJkYSBBeCcgXGxlcSBcbGFtYmRhIGI=
!!mathjaxend-i!!,
that is !!mathjaxbegin-i!! QSBcbGFtYmRhIHgnIFxsZXEgXGxhbWJkYSBi
!!mathjaxend-i!!. Similarly, for !!mathjaxbegin-i!! eCcn
!!mathjaxend-i!!, we have
that !!mathjaxbegin-i!! QSAoMS1cbGFtYmRhKSB4JyBcbGVxICgxLVxsYW1iZGEpIGI=
!!mathjaxend-i!!. Summing the inequalities, we
get:
!!mathjaxbegin-d!! CiBBW1xsYW1iZGEgeCcgKyAoMS1cbGFtYmRhKSB4JyddIFxsZXEgW1xsYW1iZGEgKyAoMS1cbGFt
YmRhKV0gYiA9IGIsCg==
!!mathjaxend-d!!
which means that !!mathjaxbegin-i!! XGhhdHt4fSA9IFxsYW1iZGEgeCcgKyAoMS1cbGFtYmRhKSB4Jyc=
!!mathjaxend-i!! is again a
solution of the original set of inequalities, thus concluding the argument.
A nice set of recent posts have done a great job detailing the remaining ways that a root user can get at kernel memory. Part of this is driven by the ideas behind UEFI Secure Boot, but they come from the same goal: making sure that the root user cannot directly subvert the running kernel. My perspective on this is toward making sure that an attacker who has gained access and then gained root privileges can t continue to elevate their access and install invisible kernel rootkits.
An outline for possible attack vectors is spelled out by Matthew Gerrett s continuing useful kernel lockdown patch series. The set of attacks was examined by Tyler Borland in Bypassing modules_disabled security . His post describes each vector in detail, and he ultimately chooses MSR writing as the way to write kernel memory (and shows an example of how to re-enable module loading). One thing not mentioned is that many distros have MSR access as a module, and it s rarely loaded. If modules_disabled is already set, an attacker won t be able to load the MSR module to begin with. However, the other general-purpose vector, kexec, is still available. To prove out this method, Matthew wrote a proof-of-concept for changing kernel memory via kexec.
Chrome OS is several steps ahead here, since it has hibernation disabled, MSR writing disabled, kexec disabled, modules verified, root filesystem read-only and verified, kernel verified, and firmware verified. But since not all my machines are Chrome OS, I wanted to look at some additional protections against kexec on general-purpose distro kernels that have CONFIG_KEXEC enabled, especially those without UEFI Secure Boot and Matthew s lockdown patch series.
My goal was to disable kexec without needing to rebuild my entire kernel. For future kernels, I have proposed adding /proc/sys/kernel/kexec_disabled, a partner to the existing modules_disabled, that will one-way toggle kexec off. For existing kernels, things got more ugly.
What options do I have for patching a running kernel?
First I looked back at what I d done in the past with fixing vulnerabilities with systemtap. This ends up being a rather heavy-duty way to go about things, since you need all the distro kernel debug symbols, etc. It does work, but has a significant problem: since it uses kprobes, a root user can just turn off the probes, reverting the changes. So that s not going to work.
Next I looked at ksplice. The original upstream has gone away, but there is still some work being done by Jiri Slaby. However, even with his updates which fixed various build problems, there were still more, even when building a 3.2 kernel (Ubuntu 12.04 LTS). So that s out too, which is too bad, since ksplice does exactly what I want: modifies the running kernel s functions via a module.
So, finally, I decided to just do it by hand, and wrote a friendly kernel rootkit. Instead of dealing with flipping page table permissions on the normally-unwritable kernel code memory, I borrowed from PaX s KERNEXEC feature, and just turn off write protect checking on the CPU briefly to make the changes. The return values for functions on x86_64 are stored in RAX, so I just need to stuff the kexec_load syscall with mov -1, %rax; ret (-1 is EPERM):
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/init.h>
#include <linux/module.h>
#include <linux/slab.h>
static unsigned long long_target;
static char *target;
module_param_named(syscall, long_target, ulong, 0644);
MODULE_PARM_DESC(syscall, "Address of syscall");
/* mov $-1, %rax; ret */
unsigned const char bytes[] = 0x48, 0xc7, 0xc0, 0xff, 0xff, 0xff, 0xff,
0xc3 ;
unsigned char *orig;
/* Borrowed from PaX KERNEXEC */
static inline void disable_wp(void)
unsigned long cr0;
preempt_disable();
barrier();
cr0 = read_cr0();
cr0 &= ~X86_CR0_WP;
write_cr0(cr0);
static inline void enable_wp(void)
unsigned long cr0;
cr0 = read_cr0();
cr0 = X86_CR0_WP;
write_cr0(cr0);
barrier();
preempt_enable_no_resched();
static int __init syscall_eperm_init(void)
int i;
target = (char *)long_target;
if (target == NULL)
return -EINVAL;
/* save original */
orig = kmalloc(sizeof(bytes), GFP_KERNEL);
if (!orig)
return -ENOMEM;
for (i = 0; i < sizeof(bytes); i++)
orig[i] = target[i];
pr_info("writing %lu bytes at %p\n", sizeof(bytes), target);
disable_wp();
for (i = 0; i < sizeof(bytes); i++)
target[i] = bytes[i];
enable_wp();
return 0;
module_init(syscall_eperm_init);
static void __exit syscall_eperm_exit(void)
int i;
pr_info("restoring %lu bytes at %p\n", sizeof(bytes), target);
disable_wp();
for (i = 0; i < sizeof(bytes); i++)
target[i] = orig[i];
enable_wp();
kfree(orig);
module_exit(syscall_eperm_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Kees Cook <kees@outflux.net>");
MODULE_DESCRIPTION("makes target syscall always return EPERM");
If I didn t want to leave an obvious indication that the kernel had been manipulated, the module could be changed to:
sys_kexec_load (found via /proc/kallsyms) before I disable module loading via modprobe. Here s my upstart script:
# modules-disable - disable modules after rc scripts are done
#
description "disable loading modules"
start on stopped module-init-tools and stopped rc
task
script
cd /root/modules/syscall_eperm
make clean
make
insmod ./syscall_eperm.ko \
syscall=0x$(egrep ' T sys_kexec_load$' /proc/kallsyms cut -d" " -f1)
modprobe disable
end script
And now I m safe from kexec before I have a kernel that contains /proc/sys/kernel/kexec_disabled.
2013, Kees Cook. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
I absolutely and entirely renounce, relinquish and abandon the use of my former name of Dmitrijs edkovs and assume, adopt and determine to take and use from the date hereof the new name of Dimitri John Ledkov in substitution for my former name of Dmitrijs edkovs.
I shall at all times hereafter, in all records, deeds, documents and other writings and in all actions and proceedings, as well as in all dealings and transactions and on all occasions whatsoever, use and subscribe my new name of Dimitri John Ledkov in substitution for my former name of Dmitrijs edkovs so relinquished to the intent that I may hereafter be called, known and identified by the new name of Dimitri John Ledkov and not by my former name of Dmitrijs edkovs.
I authorise and require all persons, at all times, to identify, describe and address me by my new name of Dimitri John Ledkov. I make this solemn declaration conscientiously, believing the same to be true and by virtue of the provisions of the Statutory Declarations Act 1835.Now I need to get new passport, IDs and change my name pretty much everywhere. I have started the ball rolling and hopefully I'll be known by my new name everywhere soon enough.
Last year I told you that I spent two full-time days working on Debian as a part of initiative sponsored by my current employer.
This year I ve devoted these two days again for Debian.
Quick summary of what I was able to do during these two days.
11 bugs, 4 lintian errors and 43 warnings were fixed. In addition 3 packages now use new source format (usually that means repackaging software from scratch). 4 uses new copyright format and the newest Standards-Version. 5 packages were updated to the newest upstream version.
Changelog entries:
potrace (1.11-1) unstable; urgency=low
* The Akamai Technologies paid volunteer days release.
* New upstream version.
* Completely repackaged from scratch (funny experience as usual):
- uses new copyright format
- uses debhelper compatibility level 9 w/hardening options
- uses the newest Standards-Version
- fixes 11 lintian warnings and 2 errors
* Fixes typo in manpage. (Closes: #694492)
-- Bartosz Fenski Mon, 9 Dec 2013 11:23:32 +0100
makeself (2.2.0-1) unstable; urgency=low
* The Akamai Technologies paid volunteer days release.
* New upstream release. (Closes: #690105)
- handles df output in more portable way (Closes: #641804)
* Repackaged from scratch.
- uses new packaging format 3.0 (Closes: #670738)
- uses new copyright format
- uses debhelper compatibility level 9
- uses the newest Standards-Version
- fixes 2 lintian errors and 6 warnings
-- Bartosz Fenski Mon, 09 Dec 2013 17:32:45 +0100
dibbler (1.0.0~rc1-1) unstable; urgency=low
* The Akamai Technologies paid volunteer days release.
* New upstream release candidate 1 version (Closes: #686539)
- doesn't drop dhcp session during pppd restarts (Closes: #641237)
- doesn't hang indefinitely on 'stop' (Closes: #675272)
* Calls dh --with autotools_dev to prevent build failures (Closes: 727356)
* Includes Japanese debconf translation (Closes: #718921)
* Updated Standards-Version (no changes needed)
* Uses debhelper compatibility level 9 w/hardening options
* init scripts now source init functions
* Fixes 20 lintian warnings.
-- Bartosz Fenski Tue, 10 Dec 2013 10:05:56 +0100
calcurse (3.1.4-1) unstable; urgency=low
* The Akamai Technologies paid volunteer days release.
* New upstream version.
* ACK previous NMU - thanks!
* Bumped Standards-Version (no changes needed)
-- Bartosz Fenski Tue, 10 Dec 2013 12:22:06 +0100
ipcalc (0.41-4) unstable; urgency=low
* The Akamai Technologies paid volunteer days release.
* Fixes overzealous input checking (Closes: #332468)
* Martin F Krafft removed as co-maintainer (Closes: #719098)
+ package now uses new copyright format
* Bumped Standards-Version (no changes needed)
-- Bartosz Fenski Tue, 10 Dec 2013 13:05:15 +0100
msort (8.53-1) unstable; urgency=low
* The Akamai Technologies paid volunteer days release.
* New upstream release.
* ACK previous NMUs, thanks!
* Switched to new source format.
* Switched to new copyright format.
* Moved patches to new quilt format and described them.
* Bumped Standards-Version (no changes needed)
* Has correct tcl/tk dependencies (Closes: #545135)
* Doesn't segfault with certain input (Closes: #630485)
-- Bartosz Fenski Tue, 10 Dec 2013 16:39:44 +0100
Thank you Akamai
A new Armadillo release 3.930 came
out a few days ago, with a very nice set of changes (see below). I rolled
this into RcppArmadillo
0.3.930.0. However, one of these changes revealed that R shipped only the standard SVD for
complex-valued matrices, and not the more performant divide-and-conquer
approach. So in R builds using the default built-in Lapack, at least one
CRAN package no longer built.
After some back and forth, Conrad
put some branching in the library to fall back to the standard SVD, and I
added a built-time configuration test for an appropriate preprocessor
directive used by the fallback code. This is now on
which is now on CRAN
and in Debian as
RcppArmadillorelease
0.3.930.1, and Conrad will probably update the
Armadillo page as well (though the
fix is only needed with R's builtin Rlapack). Also of note is that R Core
already added the missing Fortran routine zgesdd to R 3.1.0 (aka
"R-devel") so this issue goes away with the next release. Also of note, I
wrote up a short Rcpp Gallery post
illustrating the performance gains available from divide-and-conquer SVD.
The complete list of changes is below.
Changes in RcppArmadillo version 0.3.930.1 (2013-12-09)Courtesy of CRANberries, there is also a diffstat report for the most recent release 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.Changes in RcppArmadillo version 0.3.930.0 (2013-12-06)
- Upgraded to Armadillo release Version 3.930.1
- Armadillo falls back to standard complex svd if the more performant divide-and-conquer variant is unavailable
- Added detection for Lapack library and distinguish between R's own version (withhout
zgesdd) and system Lapack; a preprocessor define is set accordingly
- Upgraded to Armadillo release Version 3.930 ("Dragon's Back")
- added divide-and-conquer variant of
svd_econ(), for faster SVD- added divide-and-conquer variant of
pinv(), for faster pseudo-inverse- added element-wise variants of
min()andmax()- added
size()based specifications of submatrix view sizes- added
randi()for generating matrices with random integer values- added more intuitive specification of sort direction in
sort()andsort_index()- added more intuitive specification of method in
det(),.i(),inv()andsolve()- added more precise timer for the
wall_clockclass when using C++11- New unit tests for complex matrices and vectors
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
dc elements for the realm were appended to a provided
partial base. Now, the complete DN of the root of the Active Directory
tree should be provided. This is more flexible and more useful with a
wider variety of Active Directory setups.
Second, I took advantage of the backward-incompatibilities to change the
module name to sync.so from krb5_sync.so, since the latter
sounded weirdly redundant and verbose when installed in the Kerberos
plugin directory. This will require a configuration change to the plugin
configuration for the KDC or kadmin server.
Also in this release are a couple of new options: ad_queue_only, which
forces all changes to be queued for later processing instead of processed
in real time, and syslog, which can be used to turn off the internal
syslog logging of non-errors from the module. (This is mostly useful for
test suites.)
Now, password changes are queued on any Active Directory failure, not just
a few oddly-distinguished ones. The previous behavior was rather specific
to Stanford's needs, and queuing all password changes shouldn't pose any
problems.
Finally, the krb5-sync-backend utility program for manipulating the queued
changes has been completely rewritten and is much cleaner. It now uses
the Net::Remctl::Backend Perl module for command and option handling, so
that module (provided with remctl 3.4 or
later) must be installed. It also requires IPC::Run, which is available
from CPAN. It uniformly supports a -d option to specify the queue
location, and skips event files during processing that no longer exist.
You can get the latest release from krb5-sync distribution page.
--with flag without a path would
result in yes/include and yes/lib to be added to the
compiler and linker paths. It also adds Autoconf probles for Cyrus SASL
libraries, contributed by Julien LIE based on the INN macros.
This release also adds support for KADM5_MISSING_KRB5_CONF_PARAMS to
portable/kadmin.h and the test_tmpdir function to Test::RRA::Automake.
The latter works the same as it does in the C and shell TAP libraries.
Finally, the shared valgrind suppression file adds a suppression for the
memory allocated by dlopen to store error messages for dlerror on Linux,
which is apparently never freed.
You can get the latest release from the rra-c-util distribution page.
Once more, I m going to FOSDEM 2014, the largest Free/Libre/Open Source Software event in Europe (5,000 attendants every year).
There have been some dark days for UK coops recently the crystal Methodist and all that and I have not been able to talk about it much because of the amount of work that I want to do before the end of the year.
Happily good colleagues have been writing about it and here s another good article from Kate Whittle that links to Ed Mayo and Ian Snaith who are the other two that I d suggest. http://www.cooperantics.coop/2013/12/09/co-ops-governance/
I should be back in a few days to summarise the event I attended last week.
My ASUS Transformer TF101 had suddenly started flickering in all sorts of funny
colors some weeks ago. As tapping it gently on the table in the right angle made
the problem go away temporarily, it was clear the problem was about a loose
cable, or some other hardware connection issue.
As I needed to go on a business trip the other day, I didn't look up the
warranty expiration day until later that week. Then, Murphy struck: the tablet
was now 2 years + 1 day old! Calling ASUS, some friendly guy there suggested I
still tried to get ASUS to accept it for warranty, because the tablet had been
with them last year for 5 days, so if they added that, it would still be within
the warranty period. I filled out the RMA form, but one hour later the reply was
they rejected it because it was out of warranty. Another guy on the phone then
said they would probably only do the adding if it had been with them for maybe
10 days, or actually really 30 days, or whatever.
Some googling suggested that the loose cable theory was indeed worth a try, so I
took it
apart. Thanks to a
forum
post I could then locate the display connector and fix it.
Putting the case back together was actually harder than disassembling it because
some plastic bits got stuck, but now everything is back to normal.
I spent yesterday at the very enjoyable
Big Data Summit
held at the
University of Illinois Research Park
at the edge of the
University of Illinois at Urbana-Champaign.
campus.
My (short) presentation was part of a panel session on R and Big Data
which Doug Simpson
of the UIUC Statistics department
had put together very well. We heard from a vendor / technology
provider with Christopher Nguyen from Adatao
talking about their "Big R", from industry with Andy Stevens talking about
a number of some real-life challenges with big data at
John Deere,
from academia with
Jonathon Greenberg
talking about R and HPC for geospatial research and I added a few short
comments and links about R, HPC and Rcpp. My few slides are now up on
my talks / presentations page.
Overall, a good day with a number of interesting presentations and of course
a number of engaging hallway discussions.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Probably you know, most of Debian contributors are in Euro/America(North and South), not in Asia. But there are lots of talented people. It means: there is huge possibility for Debian :)
Next.