corrupted json payload when adding a device
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gpsd (Ubuntu) |
Fix Released
|
Medium
|
Christian Ehrhardt | ||
Focal |
Fix Released
|
Medium
|
Christian Ehrhardt |
Bug Description
[Impact]
* Broken in 3.20 (>=Focal) by upstream the socket which is meant to
produce json output has one of its messages violating the json format.
* This leads to applications relying on the integrity of these messages to
fail.
* Fix by backporting a small upstream commit
[Test Case]
Start without a device like /etc/defaul/gpsd
DEVICES=""
Attach a json watcher like to gpsd like
$ telnet localhost 2947
then enter
?WATCH=
This looks like:
$ telnet localhost 2947
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
{"class"
?WATCH=
{"class"
{"class"
Then on another console attach the device:
$ sudo gpsdctl add /dev/ttyUSB0
In the telnet socket watch you will see:
{"class"
And the last element in this is violating JSON.
With the fix this no more happens.
[Other Info]
* n/a
---
Could you please add the patch to this issue to the ubuntu package:
https:/
TIA,
Andreas
andreast@
Description: Ubuntu 20.04 LTS
Release: 20.04
The installed packet version is 3.20-8
Related branches
- Lucas Kanashiro (community): Approve
- Canonical Server packageset reviewers: Pending requested
- Canonical Server: Pending requested
-
Diff: 62 lines (+40/-0)3 files modifieddebian/changelog (+6/-0)
debian/patches/lp-1879272-gpsd-Quote-the-activated-timestamp-in-the-json-paylo.patch (+33/-0)
debian/patches/series (+1/-0)
- Canonical Server: Pending requested
- Canonical Server packageset reviewers: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 90 lines (+44/-2)5 files modifieddebian/changelog (+6/-0)
debian/control (+2/-1)
debian/control.in (+2/-1)
debian/patches/lp-1879272-gpsd-Quote-the-activated-timestamp-in-the-json-paylo.patch (+33/-0)
debian/patches/series (+1/-0)
Changed in gpsd (Ubuntu Focal): | |
status: | Triaged → In Progress |
Changed in gpsd (Ubuntu): | |
status: | In Progress → Fix Committed |
Thanks for reporting this bug and also the provided upstream patch. Just to make it clear this is the mentioned patch:
https:/ /gitlab. com/gpsd/ gpsd/-/ commit/ 733495192307d43 c9e3bdd9e1b2020 45e66d998b