Skip to content
Snippets Groups Projects
  1. Oct 19, 2022
  2. Oct 18, 2022
  3. Oct 17, 2022
  4. Oct 11, 2022
  5. Oct 10, 2022
  6. Oct 06, 2022
    • Aleksander Morgado's avatar
      sms-part-3gpp: coding style fixes · 1db9cf46
      Aleksander Morgado authored
      1db9cf46
    • Aleksander Morgado's avatar
      broadband-modem-mbim: ensure message array contains valid PDUs · 795103cf
      Aleksander Morgado authored
      When reading SMS PDUs during initialization or upon a notification of
      a new PDU arriving, we should ensure that the array of messages
      returned is of type PDU, and also validate whether the array contains
      valid PDUs before processing them, otherwise we could be dereferencing
      invalid memory.
      
      This is trying to fix crashes like the following:
      
          0x000059502b7ebaa2(ModemManager -mm-broadband-modem-mbim.c:7816)add_sms_part
          0x000059502b7f5cf5(ModemManager -mm-broadband-modem-mbim.c:7849)sms_read_query_ready
          0x000079e48edb36d3(libgio-2.0.so.0 -gtask.c:1230)g_task_return_now
          0x000079e48edb2732(libgio-2.0.so.0 -gtask.c:1300)g_task_return
          0x000079e48ee64ce5(libmbim-glib.so.4 -mbim-device.c:240)transaction_task_complete_and_free
          0x000079e48ee6665f(libmbim-glib.so.4 -mbim-device.c:1017)data_available
          0x000079e48ec65463(libglib-2.0.so.0 -gmain.c:3417)g_main_context_dispatch
          0x000079e48ec6576e(libglib-2.0.so.0 -gmain.c:4211)g_main_context_iterate
          0x000079e48ec659e2(libglib-2.0.so.0 -gmain.c:4411)g_main_loop_run
          0x000059502b7796b1(ModemManager -main.c:217)main
          0x000079e48e9f77a7(libc.so.6 + 0x000227a7)__libc_start_main
          0x000059502b7794b9(ModemManager + 0x0005f4b9)_start
          0x00007ffef825c6a7
      795103cf
  7. Oct 05, 2022
    • Aleksander Morgado's avatar
      sim-mbim: fix race condition when sync requested during preload · 125ef272
      Aleksander Morgado authored
      This is an extremely tricky race condition.
      
       * During SIM object initialization, we try to load SIM type (first
         item loaded).
       * MMSimMbim SIM type loading step runs preload_subscriber_info(),
         which:
         ** Sets self->priv->preload = TRUE; so that it is not run anymore.
         ** Sets the sync monitor to clear preloaded info if sync needed.
         ** Runs the subscriber ready status operation asynchronously.
         ** Just before the subscriber ready status operation returns, the
            system goes to sleep.
         ** The resume logic kicks in, and we flag the modem with sync
            needed, which clears the self->priv->preload flag.
       * Then the subscriber ready status operation response arrives, and we
         store the IMSI and the other things.
       * When the next initialization step happens, given that
         self->priv->preload is cleared, we run attempt to run
         preload_subscriber_info() again, and this time it finds the info like
         IMSI is already set, so asserts:
      
          0x00007cbcd287523f (libglib-2.0.so.0 - gtestutils.c: 3253)      g_assertion_message
          0x00007cbcd28752a2 (libglib-2.0.so.0 - gtestutils.c: 3279)      g_assertion_message_expr
          0x00005cbdab0a2dc0 (ModemManager - mm-sim-mbim.c: 253)  subscriber_ready_status_ready
          0x00007cbcd29a173b (libgio-2.0.so.0 - gtask.c: 1230)    g_task_return_now
          0x00007cbcd29a0799 (libgio-2.0.so.0 - gtask.c: 1300)    g_task_return
          0x00007cbcd2a548e0 (libmbim-glib.so.4 - mbim-device.c: 264)     transaction_task_complete_and_free
          0x00007cbcd2a562fc (libmbim-glib.so.4 - mbim-device.c: 1047)    data_available
          0x00007cbcd28534a6 (libglib-2.0.so.0 - gmain.c: 3417)   g_main_context_dispatch
          0x00007cbcd28537b1 (libglib-2.0.so.0 - gmain.c: 4211)   g_main_context_iterate
          0x00007cbcd2853a25 (libglib-2.0.so.0 - gmain.c: 4411)   g_main_loop_run
          0x00005cbdab034d26 (ModemManager - main.c: 217) main
          0x00007cbcd25e16c5 (libc.so.6 + 0x000286c5)     __libc_init_first
          0x00007cbcd25e1781 (libc.so.6 + 0x00028781)     __libc_start_main
          0x00005cbdab034a40 (ModemManager + 0x00061a40)  _start
      
      In order to solve this, upon a sync request the ongoing preload
      operation will be cancelled.
      125ef272
    • Aleksander Morgado's avatar
      iface-modem-3gpp: disallow Scan() or Register() if Locked · eee9a6f6
      Aleksander Morgado authored and Aleksander Morgado's avatar Aleksander Morgado committed
      We are exporting the 3GPP interface even when locked, so we should
      cleanly disallow the Scan() and Register() operations on that state,
      instead of wrongly assuming they may never happen.
      
        0x00007c192134944a (libc.so.6 + 0x0003744a)     gsignal
        0x00007c19213344e8 (libc.so.6 + 0x000224e8)     abort
        0x00007c19215c4221 (libglib-2.0.so.0 - gtestutils.c: 3253)      g_assertion_message
        0x00007c19215c4284 (libglib-2.0.so.0 - gtestutils.c: 3279)      g_assertion_message_expr
        0x00005b3eec9c9fbc (ModemManager - mm-iface-modem-3gpp.c)       handle_scan_auth_ready
        0x00007c19216ef75b (libgio-2.0.so.0 - gtask.c: 1230)    g_task_return_now
        0x00007c19216ee7b9 (libgio-2.0.so.0 - gtask.c: 1300)    g_task_return
        0x00005b3eec99a5ef (ModemManager - mm-dispatcher-fcc-unlock.c: 69)      dispatcher_run_ready
        0x00007c19216ef75b (libgio-2.0.so.0 - gtask.c: 1230)    g_task_return_now
        0x00007c19216ef78e (libgio-2.0.so.0 - gtask.c: 1244)    complete_in_idle_cb
        0x00007c19215a2486 (libglib-2.0.so.0 - gmain.c: 3417)   g_main_context_dispatch
        0x00007c19215a2791 (libglib-2.0.so.0 - gmain.c: 4211)   g_main_context_iterate
        0x00007c19215a2a05 (libglib-2.0.so.0 - gmain.c: 4411)   g_main_loop_run
        0x00005b3eec998451 (ModemManager - main.c: 217) main
        0x00007c19213347a7 (libc.so.6 + 0x000227a7)     __libc_start_main
        0x00005b3eec998259 (ModemManager + 0x00060259)  _start
      
      Fixes 83e7600a
      eee9a6f6
    • Aleksander Morgado's avatar
    • Aleksander Morgado's avatar
      libmm-glib,common-helpers: don't assume new_from_unix_utc() always succeeds · bfba2650
      Aleksander Morgado authored
      The g_date_time_new_from_unix_utc() method in glib2 may fail if the
      given timestamp is too far into the future. The value is supposed to
      be seconds since unix time origin, but internally it will be converted
      into usecs, so any value longer than G_MAXINT64 / USEC_PER_SECOND
      isn't allowed.
      
      This is currently used in the CLI, and we're anyway ignoring the error
      returned in that case, but at least it won't crash if it ever happens.
      bfba2650
  8. Sep 30, 2022
  9. Sep 29, 2022
  10. Sep 28, 2022
Loading