kselftest: seccomp kill_after_ptrace() timeout

Bug #1872047 reported by Andrea Righi
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Andrea Righi
Eoan
Fix Released
Medium
Andrea Righi
Focal
Fix Released
Medium
Andrea Righi
linux-oem-5.6 (Ubuntu)
Fix Released
Undecided
Unassigned
Eoan
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

While running seccomp_bpf, kill_after_ptrace() gets stuck if we run it
via /usr/bin/timeout (that is the default), until the timeout expires.

This is because /usr/bin/timeout is preventing to properly deliver
signals to ptrace'd children (SIGSYS in this case).

[Test case]

This problem can be easily reproduced by running:

 $ sudo make TARGETS=seccomp kselftest
 ...

 # [ RUN ] TRACE_syscall.skip_a#
 not ok 1 selftests: seccomp: seccomp_bpf # TIMEOUT

The test is hanging at this point until the timeout expires and then it
reports the timeout error.

[Fix]

This problem can be prevented by passing --foreground to /usr/bin/timeout,
allowing to properly deliver signals to children processes.

[Regression potential]

Not an upstream fix (patch has been sent to the lkml https://lkml.org/lkml/2020/4/10/153), but the fix is trivial and it's only affecting the selftests, not the kernel, so regression potential is minimal.

Andrea Righi (arighi)
Changed in linux (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Andrea Righi (arighi)
Changed in linux (Ubuntu Eoan):
importance: Undecided → Medium
assignee: nobody → Andrea Righi (arighi)
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1872047

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu Eoan):
status: New → Incomplete
Changed in linux (Ubuntu Eoan):
status: Incomplete → In Progress
Changed in linux (Ubuntu Focal):
status: Incomplete → In Progress
Changed in linux (Ubuntu Eoan):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Timo Aaltonen (tjaalton)
Changed in linux-oem-5.6 (Ubuntu Eoan):
status: New → Invalid
Changed in linux-oem-5.6 (Ubuntu Focal):
status: New → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

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-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

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 https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (10.6 KiB)

This bug was fixed in the package linux-oem-5.6 - 5.6.0-1010.10

---------------
linux-oem-5.6 (5.6.0-1010.10) focal; urgency=medium

  * focal/linux-oem-5.6: 5.6.0-1010.10 -proposed tracker (LP: #1876025)

  * built-using constraints preventing uploads (LP: #1875601)
    - temporarily drop Built-Using data

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * Focal update: v5.6.8 upstream stable release (LP: #1875938)
    - mm: check that mm is still valid in madvise()
    - tools/testing/nvdimm: Fix compilation failure without
      CONFIG_DEV_DAX_PMEM_COMPAT
    - watchdog: reset last_hw_keepalive time at start
    - scsi: lpfc: Fix kasan slab-out-of-bounds error in lpfc_unreg_login
    - xfs: correctly acount for reclaimable slabs
    - scsi: lpfc: Fix crash after handling a pci error
    - scsi: lpfc: Fix crash in target side cable pulls hitting WAIT_FOR_UNREG
    - scsi: libfc: If PRLI rejected, move rport to PLOGI state
    - ceph: return ceph_mdsc_do_request() errors from __get_parent()
    - ceph: don't skip updating wanted caps when cap is stale
    - pwm: imx27: Fix clock handling in pwm_imx27_apply()
    - pwm: rcar: Fix late Runtime PM enablement
    - nvme-tcp: fix possible crash in write_zeroes processing
    - ASoC: qcom: q6asm-dai: Add SNDRV_PCM_INFO_BATCH flag
    - scsi: iscsi: Report unbind session event when the target has been removed
    - tools/test/nvdimm: Fix out of tree build
    - ASoC: Intel: atom: Take the drv->lock mutex before calling
      sst_send_slot_map()
    - nvme: fix deadlock caused by ANA update wrong locking
    - drm/amd/display: Update stream adjust in dc_stream_adjust_vmin_vmax
    - dma-direct: fix data truncation in dma_direct_get_required_mask()
    - kernel/gcov/fs.c: gcov_seq_next() should increase position index
    - selftests: kmod: fix handling test numbers above 9
    - ipc/util.c: sysvipc_find_ipc() should increase position index
    - kconfig: qconf: Fix a few alignment issues
    - lib/raid6/test: fix build on distros whose /bin/sh is not bash
    - block: fix busy device checking in blk_drop_partitions
    - s390/cio: generate delayed uevent for vfio-ccw subchannels
    - s390/cio: avoid duplicated 'ADD' uevents
    - loop: Better discard support for block devices
    - Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs
      enabled"
    - powerpc/pseries: Fix MCE handling on pseries
    - nvme: fix compat address handling in several ioctls
    - pwm: renesas-tpu: Fix late Runtime PM enablement
    - pwm: bcm2835: Dynamically allocate base
    - scsi: lpfc: Fix erroneous cpu limit of 128 on I/O statistics
    - scsi: lpfc: Fix lockdep error - register non-static key
    - perf/core: Disable page faults when getting phys address
    - drm/amd/display: Calculate scaling ratios on every medium/full update
    - ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN MPWIN895CL tablet
    - ALSA: usb-audio: Add Pioneer DJ DJM-250MK2 quirk
    - block: fix busy device checking in blk_drop_partitions again
    - cxgb4: fix adapter crash due to wrong MC size
    - cxgb4: fix large delays in PTP synchronization
    - ipv4: Update fib_select_default to ...

Changed in linux-oem-5.6 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

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-focal' to 'verification-done-focal'. If the problem still exists, change the tag 'verification-needed-focal' to 'verification-failed-focal'.

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 https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-focal
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Confirmed that seccomp_bpf from ubuntu_kernel_selftests.seccomp is not timing out anymore with Eoan kernel:

https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-eoan/eoan/amd64/l/linux/20200508_151853_8b200@/log.gz

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (25.9 KiB)

This bug was fixed in the package linux - 5.4.0-31.35

---------------
linux (5.4.0-31.35) focal; urgency=medium

  * focal/linux: 5.4.0-31.35 -proposed tracker (LP: #1877253)

  * Intermittent display blackouts on event (LP: #1875254)
    - drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only

  * Unable to handle kernel pointer dereference in virtual kernel address space
    on Eoan (LP: #1876645)
    - SAUCE: overlayfs: fix shitfs special-casing

linux (5.4.0-30.34) focal; urgency=medium

  * focal/linux: 5.4.0-30.34 -proposed tracker (LP: #1875385)

  * ubuntu/focal64 fails to mount Vagrant shared folders (LP: #1873506)
    - [Packaging] Move virtualbox modules to linux-modules
    - [Packaging] Remove vbox and zfs modules from generic.inclusion-list

  * linux-image-5.0.0-35-generic breaks checkpointing of container
    (LP: #1857257)
    - SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay

  * shiftfs: broken shiftfs nesting (LP: #1872094)
    - SAUCE: shiftfs: record correct creator credentials

  * Add debian/rules targets to compile/run kernel selftests (LP: #1874286)
    - [Packaging] add support to compile/run selftests

  * shiftfs: O_TMPFILE reports ESTALE (LP: #1872757)
    - SAUCE: shiftfs: fix dentry revalidation

  * LIO hanging in iscsit_free_session and iscsit_stop_session (LP: #1871688)
    - scsi: target: iscsi: calling iscsit_stop_session() inside
      iscsit_close_session() has no effect

  * [ICL] TC port in legacy/static mode can't be detected due TCCOLD
    (LP: #1868936)
    - SAUCE: drm/i915: Align power domain names with port names
    - SAUCE: drm/i915/display: Move out code to return the digital_port of the aux
      ch
    - SAUCE: drm/i915/display: Add intel_legacy_aux_to_power_domain()
    - SAUCE: drm/i915/display: Split hsw_power_well_enable() into two
    - SAUCE: drm/i915/tc/icl: Implement TC cold sequences
    - SAUCE: drm/i915/tc: Skip ref held check for TC legacy aux power wells
    - SAUCE: drm/i915/tc/tgl: Implement TC cold sequences
    - SAUCE: drm/i915/tc: Catch TC users accessing FIA registers without enable
      aux
    - SAUCE: drm/i915/tc: Do not warn when aux power well of static TC ports
      timeout

  * alsa/sof: external mic can't be deteced on Lenovo and HP laptops
    (LP: #1872569)
    - SAUCE: ASoC: intel/skl/hda - set autosuspend timeout for hda codecs

  * amdgpu kernel errors in Linux 5.4 (LP: #1871248)
    - drm/amd/display: Stop if retimer is not available

  * Focal update: v5.4.34 upstream stable release (LP: #1874111)
    - amd-xgbe: Use __napi_schedule() in BH context
    - hsr: check protocol version in hsr_newlink()
    - l2tp: Allow management of tunnels and session in user namespace
    - net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode
    - net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
    - net: ipv6: do not consider routes via gateways for anycast address check
    - net: phy: micrel: use genphy_read_status for KSZ9131
    - net: qrtr: send msgs from local of same id as broadcast
    - net: revert default NAPI poll timeout to 2 jiffies
    - net: tun: record RX queue in skb before do_xdp_gener...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (10.6 KiB)

This bug was fixed in the package linux-oem-5.6 - 5.6.0-1010.10

---------------
linux-oem-5.6 (5.6.0-1010.10) focal; urgency=medium

  * focal/linux-oem-5.6: 5.6.0-1010.10 -proposed tracker (LP: #1876025)

  * built-using constraints preventing uploads (LP: #1875601)
    - temporarily drop Built-Using data

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * Focal update: v5.6.8 upstream stable release (LP: #1875938)
    - mm: check that mm is still valid in madvise()
    - tools/testing/nvdimm: Fix compilation failure without
      CONFIG_DEV_DAX_PMEM_COMPAT
    - watchdog: reset last_hw_keepalive time at start
    - scsi: lpfc: Fix kasan slab-out-of-bounds error in lpfc_unreg_login
    - xfs: correctly acount for reclaimable slabs
    - scsi: lpfc: Fix crash after handling a pci error
    - scsi: lpfc: Fix crash in target side cable pulls hitting WAIT_FOR_UNREG
    - scsi: libfc: If PRLI rejected, move rport to PLOGI state
    - ceph: return ceph_mdsc_do_request() errors from __get_parent()
    - ceph: don't skip updating wanted caps when cap is stale
    - pwm: imx27: Fix clock handling in pwm_imx27_apply()
    - pwm: rcar: Fix late Runtime PM enablement
    - nvme-tcp: fix possible crash in write_zeroes processing
    - ASoC: qcom: q6asm-dai: Add SNDRV_PCM_INFO_BATCH flag
    - scsi: iscsi: Report unbind session event when the target has been removed
    - tools/test/nvdimm: Fix out of tree build
    - ASoC: Intel: atom: Take the drv->lock mutex before calling
      sst_send_slot_map()
    - nvme: fix deadlock caused by ANA update wrong locking
    - drm/amd/display: Update stream adjust in dc_stream_adjust_vmin_vmax
    - dma-direct: fix data truncation in dma_direct_get_required_mask()
    - kernel/gcov/fs.c: gcov_seq_next() should increase position index
    - selftests: kmod: fix handling test numbers above 9
    - ipc/util.c: sysvipc_find_ipc() should increase position index
    - kconfig: qconf: Fix a few alignment issues
    - lib/raid6/test: fix build on distros whose /bin/sh is not bash
    - block: fix busy device checking in blk_drop_partitions
    - s390/cio: generate delayed uevent for vfio-ccw subchannels
    - s390/cio: avoid duplicated 'ADD' uevents
    - loop: Better discard support for block devices
    - Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs
      enabled"
    - powerpc/pseries: Fix MCE handling on pseries
    - nvme: fix compat address handling in several ioctls
    - pwm: renesas-tpu: Fix late Runtime PM enablement
    - pwm: bcm2835: Dynamically allocate base
    - scsi: lpfc: Fix erroneous cpu limit of 128 on I/O statistics
    - scsi: lpfc: Fix lockdep error - register non-static key
    - perf/core: Disable page faults when getting phys address
    - drm/amd/display: Calculate scaling ratios on every medium/full update
    - ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN MPWIN895CL tablet
    - ALSA: usb-audio: Add Pioneer DJ DJM-250MK2 quirk
    - block: fix busy device checking in blk_drop_partitions again
    - cxgb4: fix adapter crash due to wrong MC size
    - cxgb4: fix large delays in PTP synchronization
    - ipv4: Update fib_select_default to ...

Changed in linux-oem-5.6 (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (38.1 KiB)

This bug was fixed in the package linux - 5.3.0-53.47

---------------
linux (5.3.0-53.47) eoan; urgency=medium

  * eoan/linux: 5.3.0-53.47 -proposed tracker (LP: #1877257)

  * Intermittent display blackouts on event (LP: #1875254)
    - drm/i915: Limit audio CDCLK>=2*BCLK constraint back to GLK only

  * Unable to handle kernel pointer dereference in virtual kernel address space
    on Eoan (LP: #1876645)
    - SAUCE: overlayfs: fix shitfs special-casing

linux (5.3.0-52.46) eoan; urgency=medium

  * eoan/linux: 5.3.0-52.46 -proposed tracker (LP: #1874752)

  * alsa: make the dmic detection align to the mainline kernel-5.6
    (LP: #1871284)
    - ALSA: hda: add Intel DSP configuration / probe code
    - ALSA: hda: fix intel DSP config
    - ALSA: hda: Allow non-Intel device probe gracefully
    - ALSA: hda: More constifications
    - ALSA: hda: Rename back to dmic_detect option
    - [Config] SND_INTEL_DSP_CONFIG=m
    - [packaging] Remove snd-intel-nhlt from modules

  * built-using constraints preventing uploads (LP: #1875601)
    - temporarily drop Built-Using data

  * ubuntu/focal64 fails to mount Vagrant shared folders (LP: #1873506)
    - [Packaging] Move virtualbox modules to linux-modules
    - [Packaging] Remove vbox and zfs modules from generic.inclusion-list

  * linux-image-5.0.0-35-generic breaks checkpointing of container
    (LP: #1857257)
    - SAUCE: overlayfs: use shiftfs hacks only with shiftfs as underlay

  * shiftfs: broken shiftfs nesting (LP: #1872094)
    - SAUCE: shiftfs: record correct creator credentials

  * Add debian/rules targets to compile/run kernel selftests (LP: #1874286)
    - [Packaging] add support to compile/run selftests

  * shiftfs: O_TMPFILE reports ESTALE (LP: #1872757)
    - SAUCE: shiftfs: fix dentry revalidation

  * getitimer returns it_value=0 erroneously (LP: #1349028)
    - [Config] CONTEXT_TRACKING_FORCE policy should be unset

  * 5.3.0-46-generic - i915 - frequent GPU hangs / resets rcs0 (LP: #1872001)
    - drm/i915/execlists: Preempt-to-busy
    - drm/i915/gt: Detect if we miss WaIdleLiteRestore
    - drm/i915/execlists: Always force a context reload when rewinding RING_TAIL

  * alsa/sof: external mic can't be deteced on Lenovo and HP laptops
    (LP: #1872569)
    - SAUCE: ASoC: intel/skl/hda - set autosuspend timeout for hda codecs

  * Eoan update: upstream stable patchset 2020-04-22 (LP: #1874325)
    - ARM: dts: sun8i-a83t-tbs-a711: HM5065 doesn't like such a high voltage
    - bus: sunxi-rsb: Return correct data when mixing 16-bit and 8-bit reads
    - net: vxge: fix wrong __VA_ARGS__ usage
    - hinic: fix a bug of waitting for IO stopped
    - hinic: fix wrong para of wait_for_completion_timeout
    - cxgb4/ptp: pass the sign of offset delta in FW CMD
    - qlcnic: Fix bad kzalloc null test
    - i2c: st: fix missing struct parameter description
    - cpufreq: imx6q: Fixes unwanted cpu overclocking on i.MX6ULL
    - media: venus: hfi_parser: Ignore HEVC encoding for V1
    - firmware: arm_sdei: fix double-lock on hibernate with shared events
    - null_blk: Fix the null_add_dev() error path
    - null_blk: Handle null_add_dev() failures properly
    - null_blk: fix spuri...

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 5.4.0-42.46

---------------
linux (5.4.0-42.46) focal; urgency=medium

  * focal/linux: 5.4.0-42.46 -proposed tracker (LP: #1887069)

  * linux 4.15.0-109-generic network DoS regression vs -108 (LP: #1886668)
    - SAUCE: Revert "netprio_cgroup: Fix unlimited memory leak of v2 cgroups"

linux (5.4.0-41.45) focal; urgency=medium

  * focal/linux: 5.4.0-41.45 -proposed tracker (LP: #1885855)

  * Packaging resync (LP: #1786013)
    - update dkms package versions

  * CVE-2019-19642
    - kernel/relay.c: handle alloc_percpu returning NULL in relay_open

  * CVE-2019-16089
    - SAUCE: nbd_genl_status: null check for nla_nest_start

  * CVE-2020-11935
    - aufs: do not call i_readcount_inc()

  * ip_defrag.sh in net from ubuntu_kernel_selftests failed with 5.0 / 5.3 / 5.4
    kernel (LP: #1826848)
    - selftests: net: ip_defrag: ignore EPERM

  * Update lockdown patches (LP: #1884159)
    - SAUCE: acpi: disallow loading configfs acpi tables when locked down

  * seccomp_bpf fails on powerpc (LP: #1885757)
    - SAUCE: selftests/seccomp: fix ptrace tests on powerpc

  * Introduce the new NVIDIA 418-server and 440-server series, and update the
    current NVIDIA drivers (LP: #1881137)
    - [packaging] add signed modules for the 418-server and the 440-server
      flavours

 -- Khalid Elmously <email address hidden> Thu, 09 Jul 2020 19:50:26 -0400

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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