samedi 14 mars 2015 (1 post)
So, I also got myself a new toy. My current ThinkPad is a bit
ancient, but still sturdy. It's an X201s from 2010 (brought
refurbished), and it's still working pretty fine, but eh, I
couldn't resist.
The X230 was nice, but didn't have a large resolution screen
(1366×768). The X240 brought a full HD (1920×1080) IPS screen,
but lost the hardware trackpoint buttons. Finally, the X250 brings
back the buttons, still have a nice screen (not qHD or some other
trendy resolutions, but still FHD and IPS). And on top of that, it
comes with Broadwell, so that means I get smap.
It runs mostly fine out of the box on Debian sid, but for full
support some tuning is needed. I've setup a page
with more information on the laptop, and some images can be found
over there.
Yves-Alexis@16:59:22 (Debian)
mercredi 25 mars 2015 (1 post)
So I started migrating some of my LXCs to Jessie, to test the
migration in advance. The upgrade itself was easy (the LXC is
mostly empty and only runs radicale), but after the upgrade I
couldn't login anymore (using lxc-console since I don't have
lxc-attach, the host is on Wheezy). So this is mostly a note to
self.
auth.log was showing:
Mar 25 22:10:13 lxc-sync login[1033]: pam_loginuid(login:session): Cannot open /proc/self/loginuid: Read-only file system
Mar 25 22:10:13 lxc-sync login[1033]: pam_loginuid(login:session): set_loginuid failed
Mar 25 22:10:13 lxc-sync login[1033]: pam_unix(login:session): session opened for user root by LOGIN(uid=0)
Mar 25 22:10:13 lxc-sync login[1033]: Cannot make/remove an entry for the specified session
The last message isn't too useful, but the first one gave the
answer. Since LXC isn't really ready for security stuff, I have
some hardening on top of that, and one measure is to not have rw
access to /proc. I don't really need pam_loginuid there, so I just
disabled that. I just need to remember to do that after each LXC
upgrade.
Other than that, I have to boot using SystemV init, since
apparently systemd doesn't cope too well with the various
restrictions I enforce on my LXCs:
lxc-start -n sync
Failed to mount sysfs at /sys: Operation not permitted
(which is expected, since I drop CAP_SYS_ADMIN from my LXCs). I
didn't yet investigate how to stop systemd doing that, so for now
I'm falling back to SystemV init until I find the correct
customization:
lxc-start -n sync /lib/sysvinit/init
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
hostname: you must be root to change the host name
mount: permission denied
mount: permission denied
[FAIL] udev requires a mounted sysfs, not started ... failed!
failed!
mount: permission denied
[info] Setting the system clock.
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[warn] Unable to set System Clock to: Wed Mar 25 21:21:43 UTC 2015 ... (warning).
[ ok ] Activating swap...done.
mount: permission denied
mount: permission denied
mount: permission denied
mount: permission denied
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.25.2
done.
[ ok ] Cleaning up temporary files... /tmp.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
mount: permission denied
mount: permission denied
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[....] Configuring network interfaces...RTNETLINK answers: Operation not permitted
Failed to bring up lo.
done.
[ ok ] Cleaning up temporary files....
[FAIL] startpar: service(s) returned failure: hostname.sh udev ... failed!
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
dmesg: read kernel buffer failed: Operation not permitted
[ ok ] Starting Radicale CalDAV server : radicale.
Yes, there are a lot of errors, but they seem to be handled
just fine.
Yves-Alexis@22:26:04 (Debian)
lundi 30 mars 2015 (1 post)
It's been a long time since I updated my repository
with a recent kernel version, sorry for that. This is now done, the
kernel (sources, i386 and amd64) is based on the (yet unreleased)
3.2.68-1 Debian kernel, patched with grsecurity 3.1-3.2.68-201503251805,
and has the version 3.2.68-1~grsec1.
It works fine here, but as always, no warranty. If any problem
occurs, try to reproduce using vanilla 3.2.68 + grsec patch before
reporting here.
And now that Jessie release approaches, the question of what to
do with those Debian/grsec kernel still arrise: the Jessie kernel
is based on the 3.16 branch, which is not a (kernel.org) long term branch. Actually,
the support already ended some times ago, and the (long term)
maintainance is now assured by the Canonical Kernel Team (thus the
-ckt suffix) with some help from the Debian kernel maintainers. So
there's no Grsecurity patch following 3.16, and there's no easy way
to forward-port the 3.14 patches.
At that point, and considering the support I got the last few
years on this initiative, I don't think it's really worth it to
continue providing those kernels.
One initiative which might be interesting, though, is the
Mempo kernels. The
Mempo team works on kernel reproducible
builds, but they also include the grsecurity patch.
Unfortunately, it seems that building the kernel their way involves
calling a bash script which calls another one, and another one. A
quick look at the various repositories is only enough to confuse me
about how actually they build the kernel, in the end, so I'm unsure
it's the perfect fit for a supposedly secure kernel. Not that the
Debian way of building the kernel doesn't involves calling a lot of
scripts (either bash or python), but still. After digging a bit, it
seems that they're using make-kpkg (from the
kernel-package package), which is not the
recommended way
anymore. Also, they're currently targeting Wheezy, so the 3.2
kernel, and I have no idea what they'll chose for Jessie.
In the end, for myself, I might just do a quick script which
takes a git repository at the right version, pick the latest grsec
patch for that branch, applies it, then run make deb-pkg
and be done with it. That still leaves the problem of which branch
to follow:
- run a 3.14 kernel instead of the 3.16 (I'm unsure how much I'd
lose / not gain from going to 3.2 to 3.14 instead of 3.16);
- run a 3.19 kernel, then upgrade when it's time, until a new LTS
branch appears.
There's also the config file question, but if I'm just using the
kernels for myself and not sharing them, it's also easier, although
if some people are actually interested it's not hard to publish
them.
Yves-Alexis@22:27:21 (Debian)