This bug is awaiting verification that the kernel in -proposed solves
the problem. Please test the kernel and update this bug with the
results. If the problem is solved, change the tag 'verification-needed-
xenial' to 'verification-done-xenial'. If the problem still exists,
change the tag 'verification-needed-xenial' to 'verification-failed-

If verification is not done by 5 working days from today, this fix will
be dropped from the source code, and this bug will be closed.

See for documentation how
to enable and use -proposed. Thank you!

** Tags added: verification-needed-xenial

You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.

  register on binfmt_misc may overflow and crash the system

Status in linux package in Ubuntu:
Status in linux source package in Precise:
Status in linux source package in Trusty:
  Fix Committed
Status in linux source package in Xenial:
  Fix Committed
Status in linux source package in Artful:
  Fix Committed
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:

Bug description:
  When registering a new binfmt_misc handler, it is possible to overflow
  the offset to get a negative value, which might crash the system, or
  possibly leak kernel data.

  Here is a crash log when 2500000000 was used as an offset:

    BUG: unable to handle kernel paging request at ffff989cfd6edca0
    IP: load_misc_binary+0x22b/0x470 [binfmt_misc]
    PGD 1ef3e067 P4D 1ef3e067 PUD 0
    Oops: 0000 [#1] SMP NOPTI
    Modules linked in: binfmt_misc kvm_intel ppdev kvm irqbypass joydev 
input_leds serio_raw mac_hid parport_pc qemu_fw_cfg parpy
    CPU: 0 PID: 2499 Comm: bash Not tainted 4.15.0-22-generic #24-Ubuntu
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.11.1-1 
    RIP: 0010:load_misc_binary+0x22b/0x470 [binfmt_misc]
    Call Trace:

  Use kstrtoint instead of simple_strtoul.  It will work as the code
  already set the delimiter byte to '\0' and we only do it when the field
  is not empty.

  [Test Case]
  Tested with offsets -1, 2500000000, UINT_MAX and INT_MAX.  Also tested
  with examples documented at Documentation/admin-guide/binfmt-misc.rst
  and other registrations from packages on Ubuntu.

  Fail to register valid types. This was tested with a bionic kernel with the 

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to