summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-06-02build: post-release version bump to 1.24.9mbim-1-24Aleksander Morgado1-1/+1
2021-06-02release: bump version to 1.24.81.24.8Aleksander Morgado1-1/+1
2021-06-02NEWS: update for 1.24.8Aleksander Morgado1-0/+12
2021-06-02build: disable gtkdocize in autoreconfAleksander Morgado1-1/+1
We have a custom modified gtk-doc.make file in our sources, which disables the gtkdoc-rebase on local install step, so we don't want autoreconf to copy a different one when we're bootstrapping. (cherry picked from commit 6394a122407f31d2321a16833d9dd123767ff8d5)
2021-05-18core: drop "volatile" for g_once_init_enter locationsAleksander Morgado3-12/+12
This fixes a few (fatal in gcc 11) warnings. See https://gitlab.gnome.org/GNOME/glib/-/issues/600 (cherry picked from commit 764d91155570d653e178ae8f12ff4de00d71e06c)
2021-05-18libmbim-glib,message: fix overflows when checking required sizeAleksander Morgado1-80/+80
The message parsers will make sure the amount of data read from the message is within the boundaries of the message itself. But, while doing so, the parser will "compute" the required size based on message field offsets and also based on offsets and sizes reported within the message itself. If these fields are malformed and report very long offsets or sizes (e.g. 0xFFFFFFFF), adding those values into a target uint32 value will definitely overflow. Fix this by making the required size computations using a target uint64 value instead, so that adding up several uint32 values (even if some of them are e.g. 0xFFFFFFFF) won't overflow the operation. Fixes https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/16 (cherry picked from commit 9016e0d72d5c7da68eccdc8413e82240a27bfeef)
2021-05-18libmbim-glib,message: trivial fix in guint64 value parsingAleksander Morgado2-2/+2
All relative offsets are 32bit values (cherry picked from commit 7a86e782e0778c458990d8f506db94bb65e4b44b)
2021-05-18libmbim-glib,test: add test to trigger overflow in the message parserAleksander Morgado1-0/+74
The test includes a "Basic Connect" "Visible Providers" response message that has both a string offset and size malformed (reported as 0x80000020 and 0x8000000A instead of 0x00000020 and 0x0000000A). See https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/16 (cherry picked from commit f574596f2c092b4f779fc3ec03fa0e852b12a104)
2021-04-30ci: build should be supported back to bionicAleksander Morgado1-3/+3
Also, include ninja and meson in the image template, to have it ready by the time we add the meson support. (cherry picked from commit 13883cd5c4d28dbed3c49008430c7dbbae8d5ef0)
2021-04-28ci: switch to gitlab templatesAleksander Morgado1-6/+75
(cherry picked from commit 435649cbebd72aed8b128deabc8bd1405261ecfa)
2021-01-22build: post-release version bump 1.24.7Aleksander Morgado1-1/+1
2021-01-22release: bump version to 1.24.61.24.6Aleksander Morgado1-1/+1
2021-01-22NEWS: update for 1.24.6Aleksander Morgado1-0/+11
2020-11-26build: fix distcheck with new gtk-docAleksander Morgado2-0/+2
The .actions file is generated by newer gtk-doc releases, we just treat it as e.g. the .signals or .types files. This is also already fixed in upstream gtk-doc: https://gitlab.gnome.org/GNOME/gtk-doc/-/merge_requests/61 (cherry picked from commit 83736783fcbca51aed49e6acf942ee560546a9b6)
2020-11-13libmbim-glib,device: don't warn if descriptors file cannot be readAleksander Morgado1-4/+10
This is possibly just because we're not using cdc_mbim, it shouldn't be a reason to warn anything. (cherry picked from commit f007997cc15494aac4791bc13b24bb118e6cdc91)
2020-11-13libmbim-glib,device: realpath() returns NULL if path doesn't existAleksander Morgado1-1/+1
Running realpath() on a path that doesn't exist returns NULL, so don't even attempt to run g_file_test() on it. The g_file_test() may even be redundant, but well. (cherry picked from commit aff2313b4153a05f6466ebd337f53354398b25f2)
2020-11-13libmbim-glib,device: avoid using an already unref-ed sourceAleksander Morgado1-3/+5
We were creating the source, attaching it to the main context, and removing our reference right away. That meant that the ownership of the source was fully given to the main context, and so we shouldn't have attempted to remove it from the main context later on, as it could have already been fired and removed behind our back. Solve this, by making sure we keep a valid source reference of our own, and in this way we can safely destroy the source (it's fine to destroy an already destroyed source, as long as the reference is valid) and then fully unref it. ModemManager[55085]: transaction 0x6 aborted, but message is not abortable ModemManager[55085]: [/dev/mhi_MBIM] MBIM error: Cannot write message: Broken pipe (ModemManager:55085): GLib-CRITICAL **: 10:04:58.605: g_source_destroy: assertion 'g_atomic_int_get (&source->ref_count) > 0' failed Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff775ef23 in g_logv () from /usr/lib/libglib-2.0.so.0 (gdb) bt #0 0x00007ffff775ef23 in g_logv () at /usr/lib/libglib-2.0.so.0 #1 0x00007ffff775f1a0 in g_log () at /usr/lib/libglib-2.0.so.0 #2 0x00007ffff7a8f564 in transaction_context_free (ctx=0x5555558254a0) at mbim-device.c:162 #3 0x00007ffff79240ba in () at /usr/lib/libgio-2.0.so.0 #4 0x00007ffff78537b1 in g_object_unref () at /usr/lib/libgobject-2.0.so.0 #5 0x00007ffff77512b3 in () at /usr/lib/libglib-2.0.so.0 #6 0x00007ffff775384a in () at /usr/lib/libglib-2.0.so.0 #7 0x00007ffff7756b90 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0 #8 0x00007ffff77a81f9 in () at /usr/lib/libglib-2.0.so.0 #9 0x00007ffff7756163 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0 #10 0x00005555555a0b15 in main (argc=2, argv=0x7fffffffeac8) at main.c:206 (cherry picked from commit ef133a7a59874cfed3e9afff896ad05505f58769)
2020-10-01build: post-release version bump to 1.24.5Aleksander Morgado1-1/+1
2020-10-01release: bump version to 1.24.41.24.4Aleksander Morgado1-1/+1
2020-10-01NEWS: update for 1.24.4Aleksander Morgado1-1/+17
2020-10-01libmbim-glib,device: get_transaction_id() already in 1.24.4Aleksander Morgado2-4/+4
2020-10-01docs: add missing references to mbim_device_get_transaction_id()Aleksander Morgado2-0/+5
(cherry picked from commit 34ce4755f8e926f7c9fa20b777e8cd7aa1720dae)
2020-10-01libmbim-glib,proxy: use same transaction id for all fragmentsBjørn Mork3-2/+29
All fragments must have the same transaction id. Signed-off-by: Bjørn Mork <bjorn@mork.no> (cherry picked from commit e266810e03712ac79b0bf4682c92a4834e216b9b)
2020-10-01libmbim-glib,proxy: don't acquire device context during untrackAleksander Morgado1-5/+2
Because if the context was never created, we would be creating it at this point, and it wouldn't make sense to do so; e.g.: [Debug] [/dev/cdc-wdm1] unexpected port hangup! [Debug] [/dev/cdc-wdm1] channel destroyed [Debug] Initial device subscribe list... [Debug] [service 0] a289cc33-bcbb-8b4f-b6b0-133ec2aae6df (basic-connect) [Debug] [service 0] 11 CIDs enabled [Debug] [service 0] [cid 0] 2 (subscriber-ready-status) [Debug] [service 0] [cid 1] 3 (radio-state) (cherry picked from commit 927706715bd91cc5cd681f29a6c643dc7d16047c)
2020-08-09mbimcli: add missing EOL in error print when closing deviceAleksander Morgado1-1/+1
[09 ago 2020, 10:15:51] [Debug] [/dev/cdc-wdm1] Received message (translated)... >>>>>> Header: >>>>>> length = 16 >>>>>> type = function-error (0x80000004) >>>>>> transaction = 11 >>>>>> Contents: >>>>>> error = 'NotOpened' (0x00000005) error: couldn't close device: MBIM protocol error: NotOpened[09 ago 2020, 10:15:51] [Debug] [/dev/cdc-wdm1] channel destroyed (cherry picked from commit 21f797058c07139e128e0b10850e921a2e982ad0)
2020-08-09libmbim-glib,proxy: avoid double GError freeAleksander Morgado1-1/+0
(cherry picked from commit 095cd71491adeab32bdc00cc247487327114e1d0)
2020-07-10build: post-release version bump to 1.24.3Aleksander Morgado1-1/+1
2020-07-10release: bump version to 1.24.21.24.2Aleksander Morgado1-1/+1
2020-07-10NEWS: update for 1.24.2Aleksander Morgado1-0/+9
2020-07-10libmbim-glib,proxy: fix reporting of merged subscribe listAleksander Morgado1-2/+2
We were doing the subscribe list merge correctly, but not reporting it as done because the 'updated' pointer is set to NULL before returning it. This was breaking QMI over MBIM indications, as the registration message to request them was never sent to the device. (cherry picked from commit ecd188ff0126866199fd453e962ba54ba1dce290)
2020-06-28libmbim-glib,proxy: fix segfault when printing updated subscriber listAleksander Morgado1-1/+2
We were printing the 'updated' variable after its contents had already been stolen. [28 Jun 2020, 03:06:27] [Debug] Merged service subscribe list built for device '/dev/cdc-wdm0' Thread 1 "mbim-proxy" received signal SIGSEGV, Segmentation fault. _mbim_proxy_helper_service_subscribe_list_debug (list=list@entry=0x0, list_size=6) at mbim-proxy-helpers.c:104 104 const MbimEventEntry *entry = list[i]; (gdb) p list $1 = (const MbimEventEntry * const *) 0x0 (gdb) p list_size $2 = 6 The segfault was only triggered when the mbim-proxy was run with --verbose. (cherry picked from commit 0590b7e911df6e014fa6a7ec48a291f33a53d580)
2020-06-23libmbim-glib,device: ignore messages with wrong MBIM message typeAleksander Morgado1-1/+28
The Cinterion mPLS62-w may end up sending messages which are clearly not well formatted MBIM messages, and upon receiving one of them, the mbim-proxy would get completely stuck (e.g. attempting to read a message of >800MB because of the reported length in the first malformed messae). Try to avoid this, by doing an initial filter by message type, which at least solves the seen problem. Not a fully robust fix yet, though. E.g. new logs: [23 jun 2020, 10:43:49] [Debug] [/dev/cdc-wdm1] Sent message (translated)... <<<<<< Header: <<<<<< length = 48 <<<<<< type = command (0x00000003) <<<<<< transaction = 20 <<<<<< Fragment header: <<<<<< total = 1 <<<<<< current = 0 <<<<<< Contents: <<<<<< service = 'atds' (5967bdcc-7fd2-49a2-9f5c-b2e70e527db3) <<<<<< cid = 'location' (0x00000002) <<<<<< type = 'query' (0x00000000) [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 293 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 200 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 168 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 311 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 311 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 311 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 335 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 277 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 312 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 314 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 312 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 280 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 312 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 312 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 326 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 260 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 244 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 326 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 326 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 326 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 306 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 334 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 324 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 356 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 356 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 191 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 201 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 356 bytes in MBIM stream as message type validation fails [23 jun 2020, 10:43:49] -Warning ** [/dev/cdc-wdm1] discarding 356 bytes in MBIM stream as message type validation fails (cherry picked from commit cbb3e3944452a940ba583020882d13f2e49acd27)
2020-06-18build: post-release version bump to 1.24.1Aleksander Morgado1-1/+1
2020-06-18release: bump version to 1.24.01.24.0Aleksander Morgado1-5/+5
2020-05-30AUTHORS: update with latest commit statsAleksander Morgado1-0/+2
2020-05-30example: always perform a clean exit, even on errorAleksander Morgado1-2/+0
2020-05-30example: GObject import not explicitly requiredAleksander Morgado1-1/+1
2020-05-29example: separate with 2 whitelines the program methodsAleksander Morgado1-0/+6
2020-05-29example: don't attempt to continue logic after quitting main loopAleksander Morgado1-0/+3
2020-05-27build: bump version to 1.23.900 (1.24-rc1)1.24-rc1Aleksander Morgado1-1/+1
2020-05-27NEWS: update for 1.24Aleksander Morgado1-0/+18
2020-05-27libmbim-glib: skip unneeded methods from introspectionAleksander Morgado2-4/+4
Don't add in introspection the methods reading GObject properties.
2020-05-27mbim-codegen: setup introspection annotations in message creatorsAleksander Morgado1-17/+17
2020-05-27examples: new simple python tester for introspection supportAleksander Morgado6-1/+137
2020-05-27mbim-codegen: set array detail annotationsAleksander Morgado1-7/+7
2020-05-27mbim-codegen: set transfer annotations in parsersAleksander Morgado1-16/+16
2020-05-27mbim-codegen: explicitly flag as optional outputs all fields in parsersAleksander Morgado1-17/+17
2020-05-18mbim-codegen: avoid needing python packaging.version.parseAleksander Morgado2-3/+22
2020-05-18docs,libmbim-glib: include API indicesAleksander Morgado1-3/+47
2020-05-18build-aux: include Since tag in methods built from enumsAleksander Morgado8-95/+99