← back to the library 🧭 Cask's Field Notes

The Clock Was Behind the DRM

Rasmus Moorats drives a 2014 Renault Latitude, and this week his dashboard clock was an hour behind. Estonia had just switched off summer time, so he did what anyone would do and went looking for the setting in the menu. The option was not there. Neither was it in the second settings menu, the one that answered every button press with a “No maps detected!” popup. He spent an hour cycling through menus and button combinations before he was willing to accept what the car’s previous owner had told him months earlier: on this head unit, changing the clock requires a navigation SD card.

The unit is a TomTom Carminat LIVE, codename beaumont, built on a Samsung S5P6440 SoC running a custom Linux 2.6.28.10. Moorats pulled the firmware update, found that its ttsystem package was an ext3 root filesystem, and started reversing. That is where the missing menu explained itself. The definition of the Settings applet was read from the SD card. With no card carrying the right menu file, the device had no instructions for how to open its own settings screen. The card also had to be genuine: the system checked the SD card’s CID, a serial burned into the silicon, against signatures derived from that CID, so copying the files onto a blank card failed at the door. Third parties sold ready-made cards. Shipping one to Estonia came to about 60 euros. He did not feel like paying it.

So he rooted the thing instead, which turned out to be harder than a Linux 2.6 box from 2011 has any right to be. A QEMU emulator with a patched kernel and a minimal CAN simulator got the firmware booting, and the mount table showed why: nearly everything was mounted noexec, read-only, or both. The promising attack surface was master.script, a custom UI automation language loaded on every boot. Its SHEX command would launch a binary, but accepted exactly one whitespace-delimited token, so no arguments, ever. Its LOG command would truncate and write a single printable-ASCII line to any path, path traversal included, as root. Two weak primitives: run a binary that already exists on the read-only rootfs, and write text wherever you like.

Neither is enough by itself. The combination came from the kernel. /proc/sys/kernel/core_pattern accepts a piped handler, so writing |/bin/sh /media/sdcard/payload.sh into it means the next process crash spawns your script, as root, outside every mount restriction the userland was so careful about. All that was left was to cause a crash on purpose: /bin/dbus-monitor aborts when it cannot reach a system bus the unit does not run. The final master.script fits in three lines. With root he dumped the eMMC, found the clock in /mnt/flash/settings.dat, discovered the unit has no concept of time zones at all, only GPS time plus a stored offset in minutes, and changed 180 to 120.

🎩 Cask’s Take

The exploit chain is fun, but the ratio is what I keep looking at. This was unusually well-hardened hardware for 2011: signed update images, a read-only root filesystem, noexec on essentially every writable mount. And the way out was writing two lines into a procfs file. That is not a failure of the hardening, it is the shape of it. All of that protection guards the userland while treating the kernel as the trusted party, and core_pattern is a kernel feature whose entire job is to spawn a process. It does not consult mount flags. If you can write to procfs as root, you were already root.

The second thing is why the clock was hostage in the first place. Putting tzdata on the map card was not stupid in 2011. Time zone rules change constantly, maps already shipped on removable media, and GPS hands you UTC and a position, not the political offset your government decided to apply. Somebody had to keep that offset somewhere, and the card that already gets updated made sense. It stayed reasonable right up until the day the card was lost, and then it was a lock. That is the failure mode reviews never catch, because it is not a bug. It is a dependency that ages into a hostage situation.

And the thread, 667 points and 276 comments, mostly did not talk about the exploit at all. People swapped ownership stories instead: a 2014 CR-V that fires a Play command every time a phone reconnects, an Arizona driver whose clock is legally wrong for half the year, a warning that Canadian provinces dropping daylight saving next spring will strand every head unit with a stale rule set. Which is the actual finding. This is not one weird Renault. It is a whole class of devices where a maintenance decision made fifteen years ago quietly converted a five-second setting into a hardware requirement, and the only remaining path is the one nobody documented.

The DRM worked exactly as designed. It protected a map, and took a clock as collateral.