oping (and noping) require root access to run

Bug #1780746 reported by Frank
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
liboping (Debian)
Fix Released
Unknown
liboping (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Won't Fix
Undecided
Unassigned

Bug Description

[Impact]

oping and noping needs root access to run. This hinders these tools usage in a given machine, making them useless for some users.

[Test Plan]

The bug can be reproduced in a bionic container/vm, with:

# apt update
# apt install -y oping
# oping -c1 localhost
# noping -c1 localhost

Verify that the 2 last commands worked as expected

# adduser -q --disabled-password --gecos reproducer reproducer
# su reproducer
$ oping -c1 localhost
$ noping -c1 localhost

Verify that the 2 last commands failed with

"ping_send failed: Operation not permitted"

After applying the proposed patch, the steps that would fail for the reproducer above, should no longer fail.

[Where problems could occur]

While the same patch is applied over the same version as the one in jammy, jammy also carry a couple, apparently unrelated, patches. This could lead to unexpected code paths that were not caught through reviews. Moreover,
the bionic package was last built during the artful development cycle, and new versions of build dependencies are available, which could trigger unexpected behaviors.

[Other Info]

This has been fixed since focal, therefore, the SRU should only apply to bionic

[Original message]

oping www.google.com
PING www.google.com (216.58.198.36) 56 bytes of data.
ping_send failed: Operation not permitted

This should be runnable as a normal user

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: oping 1.10.0-1build1
ProcVersionSignature: Ubuntu 4.15.0-24.26-generic 4.15.18
Uname: Linux 4.15.0-24-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.2
Architecture: amd64
CurrentDesktop: KDE
Date: Mon Jul 9 10:35:59 2018
InstallationDate: Installed on 2018-07-03 (5 days ago)
InstallationMedia: Kubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 SHELL=/bin/zsh
SourcePackage: liboping
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Frank (fmattheus) wrote :
Revision history for this message
Joshua Powers (powersj) wrote :

I've attached the Debian bug that was used to track this. It is fixed there and that version is found in Ubuntu Cosmic. The specific fix would need to be SRU'ed back to Bionic.

Changed in liboping (Debian):
status: Unknown → Fix Released
Changed in liboping (Ubuntu):
status: New → Fix Released
Changed in liboping (Ubuntu Bionic):
status: New → Triaged
Revision history for this message
No way man (dikkface) wrote :

If you've come here because you have this issue in bionic/18.04 and there's no fix yet, then you can download these two packages:
https://packages.ubuntu.com/xenial/amd64/oping/download
https://packages.ubuntu.com/xenial/amd64/liboping0/download
And install them manually with dpkg -i
oping will work again for you

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

A PPA with the proposed patch is available at

https://launchpad.net/~athos-ribeiro/+archive/ubuntu/liboping-non-root/+packages

Unfortunately, there is no dep8 test suite for this package.

description: updated
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Applying patch 0004-allow-non-root-usage.patch
patching file src/liboping.c
Hunk #2 succeeded at 1669 (offset -1 lines).

Refreshed the patch, generated src package, all good, patch fixes the issue.

$ dput ubuntu liboping_1.10.0-1ubuntu0.1_source.changes
Checking signature on .changes
gpg: /home/rafaeldtinoco/work/sources/ubuntu/liboping_1.10.0-1ubuntu0.1_source.changes: Valid signature from A93E0E0AD83C0D0F
Checking signature on .dsc
gpg: /home/rafaeldtinoco/work/sources/ubuntu/liboping_1.10.0-1ubuntu0.1.dsc: Valid signature from A93E0E0AD83C0D0F
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading liboping_1.10.0-1ubuntu0.1.dsc: done.
  Uploading liboping_1.10.0-1ubuntu0.1.debian.tar.xz: done.
  Uploading liboping_1.10.0-1ubuntu0.1_source.buildinfo: done.
  Uploading liboping_1.10.0-1ubuntu0.1_source.changes: done.
Successfully uploaded packages.

Changed in liboping (Ubuntu Bionic):
status: Triaged → In Progress
Revision history for this message
Robie Basak (racb) wrote :

Thank you for working on this!

Is there at least a single user of this package on Bionic who would benefit from this to be fixed in Bionic, or likely to be such a user in the future? If so, then +1 to accept this SRU. If not, then I'm reluctant because the code touched is the main code path through the program, and so there is risk to existing users for what would be no benefit to anyone else.

I will consult with the wider SRU team on their opinion of this pattern of digging up old bugs in old LTSes and fixing them.

If there is a user who would benefit from this being fixed in 18.04, then please let us know!

Changed in liboping (Ubuntu Bionic):
status: In Progress → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

> I will consult with the wider SRU team on their opinion of this pattern of digging up old bugs in old LTSes and fixing them.

I spoke to another SRU team member who concurred. We're not willing to accept an SRU unless there is at least one user reported or expected to benefit from it.

Therefore, for now, I'm rejecting this upload and marking it Won't Fix.

If there is anyone still affected, please let us know by commenting on this bug, and we can pick it up again.

Changed in liboping (Ubuntu Bionic):
status: Incomplete → Won't Fix
Revision history for this message
Robie Basak (racb) wrote : Proposed package upload rejected

An upload of liboping to bionic-proposed has been rejected from the upload queue for the following reason: "No users evidently still affected or expected to be affected.".

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.