binfmt-support doesn't honor flags: in /usr/share/binfmts/foo

Bug #790971 reported by Steve Langasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binfmt-support (Ubuntu)
Won't Fix
Medium
Colin Watson
qemu-linaro (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: binfmt-support

qemu-user-static ships a number of binfmt handlers under /usr/share/binfmts which are registered in the postinst using 'update-binfmts --import qemu-$target'. In natty, the resulting registrations under /var/lib/binfmts (and in /proc/sys/fs/binfmt_misc) don't respect the value of the flags: field set in the source file. As a result, foreign-arch suid binaries can't be run under qemu because the kernel has been told to use the suid bit from the non-setuid qemu interpreter, instead of the one from the target binary.

Please fix update-binfmts to respect the flags: field, which I think worked in previous versions.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: binfmt-support 2.0.3
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic x86_64
Architecture: amd64
Date: Tue May 31 16:21:10 2011
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: binfmt-support
UpgradeStatus: Upgraded to natty on 2011-03-24 (68 days ago)

Revision history for this message
Steve Langasek (vorlon) wrote :
Colin Watson (cjwatson)
Changed in binfmt-support (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
Revision history for this message
Colin Watson (cjwatson) wrote :

Are you sure this ever worked? I certainly never documented this syntax; the trailing colon is out of line with the rest of the syntax; and it partially duplicates the 'credentials' field added by Loïc to handle the 'C' flag.

I would recommend deleting the 'flags:' line and using the documented 'credentials yes' line instead. If you need the 'O' flag, I'd be happy to add support for 'open-binary yes'.

Changed in binfmt-support (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in qemu-linaro (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Colin Watson (cjwatson) wrote :

Actually, 'C' implies 'O' in the kernel, so there's no need to change update-binfmts here - just delete 'flags: OC' from the files in qemu-user-static and add 'credentials yes'.

Changed in binfmt-support (Ubuntu):
status: Triaged → Won't Fix
Steve Langasek (vorlon)
Changed in qemu-linaro (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qemu-linaro - 0.15.50-2011.08-0ubuntu4

---------------
qemu-linaro (0.15.50-2011.08-0ubuntu4) oneiric; urgency=low

  * FFe for new upstream version, fixing build failure in oneiric.
    LP: #832830.
  * debian/binfmts/*: replace unsupported 'flags: OC' with 'credentials yes',
    so that suid binaries work under qemu-user. LP: #790971
  * debian/binfmts/qemu-armeb: point to qemu-armeb-static, not
    qemu-arm-static. LP: #855365.

qemu-linaro (0.15.50-2011.08-0ubuntu3) oneiric; urgency=low

  * debian/patches/0001-tcg-ppc-tcg-target.c-Avoid-set-but-not-used-gcc-
    warn.patch: updated patch to fix additional warnings.
  * debian/patches/Reorder-default-ram_size-initialization.patch: patch from
    trunk, reorder default ram_size initialization, fixing a regression that
    slows down tcg-based system targets by a factor of 3-4. Thanks to
    Jan Kiszka <email address hidden>.

qemu-linaro (0.15.50-2011.08-0ubuntu2) oneiric; urgency=low

  * debian/patches/6-6-tcg-arm-Make-tcg_out_addi-inline.patch: [6/6]
    tcg-arm: Make tcg_out_addi inline. Fixes a build failure on armel.
  * debian/patches/5-6-tcg-ia64-Fix-typos-in-AREG0-setup-in-
    prologue..patch: [5/6] tcg-ia64: Fix typos in AREG0 setup in
    prologue. Fixes a build failure on ia64.
  * debian/patches/0001-tcg-ppc-tcg-target.c-Avoid-set-but-not-used-gcc-
    warn.patch: Avoid 'set but not used' gcc warnings. Fixes a build failure
    on powerpc. Thanks to Peter Maydell <email address hidden>.
  * debian/patches/target-cris-opcode-cris.h-rename-REG_PC-SP-to-
    CRIS_REG_PC-SP.patch: target-cris/opcode-cris.h: rename REG_PC/SP to
    CRIS_REG_PC/SP. Fixes a build failure on sparc. Thanks to
    Peter Maydell <email address hidden>.

qemu-linaro (0.15.50-2011.08-0ubuntu1) oneiric; urgency=low

  * New upstream release.
 -- Steve Langasek <email address hidden> Mon, 26 Sep 2011 15:07:14 -0700

Changed in qemu-linaro (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.