** Description changed:

+ [ Impact ]
+ 
+  * There are two bugs in gpsd that break gpsmon on noble. On one hand a 
re-use 
+     of freed resources and on the other a compile issue with fortify source.
+     One leads to a crash, the other to an assertion.
+  
+  * Upstream has fixes for that, and some refactor that should be no-op
+    but helps to keep patches comparable. Together they fix the crash
+    on the systems using gpsmon.
+ 
+ [ Test Plan ]
+ 
+  * Disclaimer: needs a system with a gps device (and that might be limited
+    to some kinds of them)
+ 
+  * # 1 - start gpsd either via the service or directly like e.g.:
+    $ /usr/sbin/gpsd -D5 -N -b -n -p -s 9600 /dev/loraGPS
+ 
+    # 2 start gpsmon to monitor local gps'es
+    /usr/bin/gpsmon
+ 
+  * In the bad case this runs into a buffer overflow detect and crash
+  * Good case should display whatever the gps receives so far
+ 
+ 
+ [ Where problems could occur ]
+ 
+  * I needed to backport some more context changes, tried to keep
+    them style only, but mistakes could happen.
+    But on the other hand the impact is gladly limited,
+    changes are isolated to gpsmon/monitor_nmea0183.c
+    and a minimal one in gpsmon/gpsmon.c
+    Therefore breakage should be
+     a) only in gpsmon and not gpsd
+     b) almost only for NMEA type devices
+    
+ 
+ [ Other Info ]
+ 
+  * n/a
+ 
+ ---  original bug ---
+ 
  Ubuntu 24.04 LTS
  
  ii  gpsd-tools     3.25-3ubuntu3 amd64        Global Positioning System
  - tools
  
  Calling the gpsmon utility from this package, it should show the current GPS 
status
  of the connected GPS (LEA 6M). Instead it segfaults and is therefore unusable.
  
  Tracing this, the problem is a double delwin(), ie. double-free of
  devicewin, in lines 517 and 521 of gpsmon.c
  
- Apparently this bug has been fixed upstream in 
+ Apparently this bug has been fixed upstream in
  https://gitlab.com/gpsd/gpsd/-/commit/bc840b0d3ba65d3d8fe2b7faeadd5af5ed2b5e60
  
  I have tested this patch indeed solves the problem, at least in my case.
  
  Regards,
  Mario

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2076191

Title:
  gpsmon crashes (segfault)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gpsd/+bug/2076191/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to