wget crash when printing download rate

Bug #2029930 reported by halfgaar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
wget (Debian)
Confirmed
Unknown
wget (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

All supported versions of Ubuntu suffer from crashes in wget in printing of the download speed. I've been getting this on various servers. It's been fixed upstream and should probably be included in 'updates' of all supported Ubuntu versions.

https://git.savannah.gnu.org/git/wget.git
Commit 04ab35666997fbb3cd5d72497415fb3dfd62dcc5

https://lists.gnu.org/archive/html/bug-wget/2023-08/msg00001.html

Patch attached.

Tags: patch
Revision history for this message
halfgaar (wiebe-halfgaar) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "0001-Fix-crash-when-printing-download-rate.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Mark Esler (eslerm)
information type: Public → Public Security
Revision history for this message
Marius Gedminas (mgedmin) wrote :

AFAICT from the patch, this only affects users who experience download speeds measured in terabytes per second.

Revision history for this message
halfgaar (wiebe-halfgaar) wrote :

The code also says:

if (secs == 0)
  /* If elapsed time is exactly zero, it means we're under the
     resolution of the timer. This can easily happen on systems
     that use time() for the timer. Since the interval lies between
     0 and the timer's resolution, assume half the resolution. */
  secs = ptimer_resolution () / 2.0;

secs is a double. If because of timer issues it's tiny, you can get very large numbers. In me trying to reproduce it, I saw GB/s speeds all the time that were theoretically impossible.

I started getting crashes on various Ubuntu 22.04 servers. There may have been a change somewhere that exposes it, but the problem was always there.

Revision history for this message
Mark Esler (eslerm) wrote :

Upstream will not be assigning this issue a CVE [0] and the Ubuntu Security Team does not consider this bug security relevant.

This bug is caused when calculating the download speed, but hitting an out-of-bounds on the table that contains the printable strings. It is hitting GB/s because it is, presumably, not handling the system timer resolution correctly. This is no more security relevant than any other bug that crashes wget.

@wiebe-halfgaar, thank you for raising awareness about this issue and getting it fixed upstream.

[0] https://lists.gnu.org/archive/html/bug-wget/2023-08/msg00008.html

Changed in wget (Ubuntu):
status: New → Confirmed
information type: Public Security → Public
Revision history for this message
halfgaar (wiebe-halfgaar) wrote :

Is there any progress in getting it fixed in 'updates'?

Changed in wget (Debian):
status: Unknown → New
Changed in wget (Debian):
status: New → Confirmed
Revision history for this message
halfgaar (wiebe-halfgaar) wrote :

I'm still getting a bunch of wget crashes from cron jobs I have. Is there any progress on this?

Revision history for this message
Mark Esler (eslerm) wrote :

@halfgaar, I've requested that the Foundation's team review the priority of this bug

Steve Langasek (vorlon)
Changed in wget (Ubuntu):
importance: Undecided → Low
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.