View Issue Details

IDProjectCategoryView StatusLast Update
0006675Talerexchangepublic2021-09-02 18:14
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeveritycrashReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006675: exchange httpd crashes if a malformed (?) wire account is configured
DescriptionI enabled the following wire account, but didn't configure fees:

$ taler-exchange-offline enable-account payto://foo upload

Now querying https://exchange.int.taler.net/wire causes a crash (see gdb below)
Additional Informationroot@gv:~# coredumpctl gdb 2030445
           PID: 2030445 (taler-exchange-)
           UID: 1023 (taler-internal)
           GID: 1023 (taler-internal)
        Signal: 11 (SEGV)
     Timestamp: Wed 2021-01-06 13:08:09 CET (15s ago)
  Command Line: taler-exchange-httpd -l /home/taler-internal/logs/exchange-%Y-%m-%d.log
    Executable: /home/taler-internal/local/bin/taler-exchange-httpd
 Control Group: /user.slice/user-0.slice/session-78041.scope
          Unit: session-78041.scope
         Slice: user-0.slice
       Session: 78041
     Owner UID: 0 (root)
       Boot ID: d6ea6ba7e3d84607b7d679ddc62c877e
    Machine ID: e4b9ed47b5d74097b33d0dc24af4c3dd
      Hostname: gv
       Storage: /var/lib/systemd/coredump/core.taler-exchange-.1023.d6ea6ba7e3d84607b7d679ddc62c877e.2030445.1609934889000000.zst
       Message: Process 2030445 (taler-exchange-) of user 1023 dumped core.
                
                Stack trace of thread 2030500:
                #0 0x00007faedec807e6 __GI___strlen_sse2 (libc.so.6 + 0x9d7e6)
                #1 0x00007faeddf152c5 n/a (/home/taler-internal/local/lib/libgnunetpq.so.1.0.0 + 0x52c5)

GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/taler-internal/local/bin/taler-exchange-httpd...
[New LWP 2030500]
[New LWP 2030495]
[New LWP 2030501]
[New LWP 2030496]
[New LWP 2030502]
[New LWP 2030498]
[New LWP 2030499]
[New LWP 2030503]
[New LWP 2030492]
[New LWP 2030490]
[New LWP 2030477]
[New LWP 2030480]
[New LWP 2030445]
[New LWP 2030482]
[New LWP 2030491]
[New LWP 2030494]
[New LWP 2030493]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
--Type <RET> for more, q to quit, c to continue without paging--
Core was generated by `taler-exchange-httpd -l /home/taler-internal/logs/exchange-%Y-%m-%d.log'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
120 ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.
[Current thread is 1 (Thread 0x7faeb6ffd700 (LWP 2030500))]
(gdb) bt
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:120
#1 0x00007faeddf152c5 in GNUNET_PQ_query_param_string (ptr=0x0) at pq_query_helper.c:132
#2 0x00007faeddf2cb9b in postgres_get_wire_fees (cls=0x558b21245130, wire_method=0x0,
    cb=0x558b206ab213 <add_wire_fee>, cb_cls=0x7fae9c0128b0) at plugin_exchangedb_postgres.c:8477
#3 0x0000558b206ab7a2 in build_wire_state () at taler-exchange-httpd_wire.c:241
#4 0x0000558b206abb55 in get_wire_state () at taler-exchange-httpd_wire.c:314
#5 0x0000558b206abc4b in TEH_handler_wire (rh=0x558b206bcaa0 <handlers+448>, connection=0x7fae9c000b60,
    args=0x7faeb6ffbb10) at taler-exchange-httpd_wire.c:349
#6 0x0000558b2068eada in proceed_with_handler (rh=0x558b206bcaa0 <handlers+448>, connection=0x7fae9c000b60,
    url=0x7fae9c000d39 "", inner_cls=0x7fae9c008d50, upload_data=0x0, upload_data_size=0x7faeb6ffbf58)
    at taler-exchange-httpd.c:452
#7 0x0000558b2068fef2 in handle_mhd_request (cls=0x0, connection=0x7fae9c000b60, url=0x7fae9c000d34 "/wire",
    method=0x7fae9c000d30 "GET", version=0x7fae9c000d3a "HTTP/1.0", upload_data=0x0, upload_data_size=0x7faeb6ffbf58,
    con_cls=0x7fae9c000bb8) at taler-exchange-httpd.c:1019
#8 0x00007faedee85eef in call_connection_handler (connection=connection@entry=0x7fae9c000b60) at connection.c:2142
#9 0x00007faedee87b60 in MHD_connection_handle_idle (connection=connection@entry=0x7fae9c000b60) at connection.c:3359
#10 0x00007faedee89c2e in call_handlers (con=0x7fae9c000b60, read_ready=<optimized out>, write_ready=<optimized out>,
    force_close=<optimized out>) at daemon.c:1213
#11 0x00007faedee8dcd4 in internal_run_from_select (daemon=daemon@entry=0x558b21258a60,
    read_fd_set=read_fd_set@entry=0x7faeb6ffc0a0, write_fd_set=write_fd_set@entry=0x7faeb6ffc120,
    except_fd_set=except_fd_set@entry=0x7faeb6ffc1a0) at daemon.c:3892
#12 0x00007faedee8f969 in MHD_select (daemon=daemon@entry=0x558b21258a60, may_block=<optimized out>,
    may_block@entry=1) at daemon.c:4159
#13 0x00007faedee8fa89 in MHD_polling_thread (cls=0x558b21258a60) at daemon.c:5143
#14 0x00007faededb0ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#15 0x00007faedece0d8f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb)
TagsNo tags attached.

Activities

Christian Grothoff

2021-01-06 15:53

manager   ~0017311

Fixed in all applicable places in 1f912112..73a9fe56: in taler-exchange-offline, on import via management API in taler-exchange-httpd, and upon reading the value from the database.

Christian Grothoff

2021-09-02 18:14

manager   ~0018239

Fix committed to master branch.

Related Changesets

exchange: master 73a9fe56

2021-01-06 16:52

Christian Grothoff


Details Diff
add checks to ensure payto:// URI is well-formed to taler-exchange-offline, and taler-exchange-httpd where applicable (fixes 0006675) Affected Issues
0006675
mod - src/exchange-tools/taler-exchange-offline.c Diff File
mod - src/exchange/taler-exchange-httpd_management_wire.c Diff File
mod - src/exchange/taler-exchange-httpd_wire.c Diff File

Issue History

Date Modified Username Field Change
2021-01-06 13:11 Florian Dold New Issue
2021-01-06 13:11 Florian Dold Status new => assigned
2021-01-06 13:11 Florian Dold Assigned To => Christian Grothoff
2021-01-06 15:53 Christian Grothoff Note Added: 0017311
2021-01-06 15:53 Christian Grothoff Status assigned => resolved
2021-01-06 15:53 Christian Grothoff Resolution open => fixed
2021-01-06 15:53 Christian Grothoff Fixed in Version => 0.9
2021-01-06 15:53 Christian Grothoff Target Version => 0.9
2021-07-30 13:57 Christian Grothoff Fixed in Version 0.9 => 0.8.1
2021-07-30 13:59 Christian Grothoff Target Version 0.9 => 0.8.1
2021-07-30 14:02 Christian Grothoff Fixed in Version 0.8.1 => 0.8
2021-07-30 14:02 Christian Grothoff Target Version 0.8.1 => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed
2021-09-02 18:13 Christian Grothoff Changeset attached => Taler-exchange master 73a9fe56
2021-09-02 18:14 Christian Grothoff Note Added: 0018239