Tag / Bugs

  • December 14, 2017 - Shuah Khan

    One Small Step to Harden USB Over IP on Linux

    The USB over IP kernel driver allows a server system to export its USB devices to a client system over an IP network via USB over IP protocol. Exportable USB devices include physical devices and software entities that are created on the server using the USB gadget sub-system. This article will cover a major bug related to USB over IP in the Linux kernel that was recently uncovered; it created some significant security issues but was resolved with help from the kernel community. The Basics of the USB Over IP Protocol There are two USB over IP server kernel modules: usbip-host (stub driver): A stub USB device driver that can be bound to physical USB devices to export them over the network. usbip-vudc: A virtual USB Device Controller that exports a USB device created with the USB Gadget Subsystem. There is one USB over IP client kernel module: usbip-vhci: A […]

    Read More
  • November 1, 2016 - Shuah Khan

    Beware of Ubuntu 16.10 Upgrade Woes

    I wanted to share a word of caution for anybody planning to update their development and test systems to Ubuntu 16.10: I can’t build kernels anymore. Ubuntu recommends a special patch to the kernel Makefile. This patch will work only on Ubuntu kernel sources and not the upstream Linux kernel trees. Linux kernel builds fail with the following message

    The message about CONFIG_CC_STACKPROTECTOR_STRONG is misleading because this Kernel config option is enabled in most distro kernels; disabling it won’t solve the kernel build failure problem. It fails because the position independent executable option is set as default in gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12). As a result, Linux Kernel Makefile needs to update to build the kernel with “-fno-pie” option. The Ubuntu 16.10 release notes say We have modified GCC to by-default compile programs with position independent executable support to improve the security benefits provided by Address Space Layout Randomization. This may cause […]

    Read More
  • The Light Display Manager doesn’t start on Odroid XU4 on the recent mainline kernels with exynos_defconfig. I first noticed this problem during the Linux 4.8 rc testing and this problem persists in 4.9-rc1. I want to share the root-cause, and a work-around in this post. I’m running kernel 4.9.0-rc1 with exynos_defconfig on Ubuntu 16.04 with HDMI. Light Display Manager (lightdm) fails with the following errors.

    This block repeats a few times until systemd gives up on starting lightdm. The system is operational with functioning serial console and networking, however the display doesn’t work. What Causes this problem? The following sequence of events is what leads to this problem The user space calls exynos_drm_gem_create_ioctl() with the EXYNOS_BO_NONCONTIG request to allocate GEM buffers. exynos_drm_gem_create() creates non-contiguous GEM buffers as requested. exynos_user_fb_create() comes along later and validates the GEM buffers to associate them to frame-buffer. The validation in check_fb_gem_memory_type() detects non-contiguous buffers […]

    Read More
  • BUG_ON() has been discouraged for debugging kernel problems for a very long time. However, there are still several BUG_ON() usages in the Linux Kernel. A late commit to Kernel 4.8 is one such case, and is now causing a lot of headaches with the release that came out on October 2nd, 2016. This BUG_ON() is triggered when CONFIG_DEBUG_VM is enabled. Some distributions such as the standard Fedora Kernel config enable it by default. Linus Torvalds has discovered that once this BUG_ON() triggers, the machine will have problems handling kernel paging requests and report that a reboot is required to fix a recursive fault from which the machine will never recover! Here’s his direct quote The reason the machine *dies* from that thing is that we end up then immediately having a

    and then a

    and the machine will never recover. Fixing this bug is number one priority for Linus […]

    Read More