Skip to content

Loading builds...

Changes

#121 (Mar 9, 2026, 11:44:30 AM)

bankd: Avoid osmocom logging mutex deadlock in signal handling

The main thread communicates slotmap add + delete via POSIX signals
to the worker threads.  As those signals interrupt the normal
processing of the worker thread, they might get delivered while the
thread is already logging something, causing a deadlock.  This has
been observed in the real world in the following stack trace (where it's
actually two nested signals):

As a hot-fix, let's avoid logging from the handle_sig_map{del,add}()
functions at all, making them safe against a deadlock around this mutex.

We should decide how to proceed in general with potentially some
architectural changes later on; any such changes are not suitable as a
hot fix due to their potential of introducing other regressions.

Change-Id: I5ea32886dfaf624b4dc5ad7924941c7b904c1d36
Related: SYS#7930
laforge at

#120 (Feb 27, 2026, 10:47:40 AM)

remsim-client: Don't attempt to pass on illegal TPDU length

TPDUs with length < 5 or > 260 bytes are illegal in T=0.  It doesn't
make sense to send them to bankd, triggering bugs in either bankd,
pcsc-lite or the CCID firmware down the road.  Let's filter them right
where they might originate.

Change-Id: I175eb4622d0e69dbc6aca2cddfe091a78f225da5
laforge at

#119 (Feb 27, 2026, 10:47:40 AM)

remsim-bankd: Don't pass on illegal TPDUs of illegal length

TPDUs with length < 5 bytes or > 260 bytes are illegal in T=0.  It
doesn't make sense to send them to pcsc-lite, triggering bugs in either
pcsc-lite or the CCID firmware down the road.  Let's filter them.

Change-Id: I5c9f1143b85470234acd2e2ffe3e0cf72bd2ae43
laforge at

#118 (Feb 27, 2026, 10:34:25 AM)

remsim-bankd: Don't pass on illegal TPDUs of illegal length

TPDUs with length < 5 bytes or > 260 bytes are illegal in T=0.  It
doesn't make sense to send them to pcsc-lite, triggering bugs in either
pcsc-lite or the CCID firmware down the road.  Let's filter them.

Change-Id: I5c9f1143b85470234acd2e2ffe3e0cf72bd2ae43
laforge at

#117 (Feb 27, 2026, 10:34:25 AM)

remsim-client: Don't attempt to pass on illegal TPDU length

TPDUs with length < 5 or > 260 bytes are illegal in T=0.  It doesn't
make sense to send them to bankd, triggering bugs in either bankd,
pcsc-lite or the CCID firmware down the road.  Let's filter them right
where they might originate.

Change-Id: I175eb4622d0e69dbc6aca2cddfe091a78f225da5
laforge at

#116 (Feb 27, 2026, 10:32:15 AM)

remsim-client: Don't attempt to pass on illegal TPDU length

TPDUs with length < 5 or > 260 bytes are illegal in T=0.  It doesn't
make sense to send them to bankd, triggering bugs in either bankd,
pcsc-lite or the CCID firmware down the road.  Let's filter them right
where they might originate.

Change-Id: I175eb4622d0e69dbc6aca2cddfe091a78f225da5
laforge at

#115 (Feb 27, 2026, 10:32:15 AM)

remsim-bankd: Don't pass on illegal TPDUs of illegal length

TPDUs with length < 5 bytes or > 260 bytes are illegal in T=0.  It
doesn't make sense to send them to pcsc-lite, triggering bugs in either
pcsc-lite or the CCID firmware down the road.  Let's filter them.

Change-Id: I5c9f1143b85470234acd2e2ffe3e0cf72bd2ae43
laforge at

#114 (Feb 27, 2026, 10:24:00 AM)

log at NOTICE level if somebody uses loopback addresses.

It appears a common mistake is to e.g. run remsim-server + remsim-bankd
on one machine and then instruct them to use localhost or other
loopback-routed addresses.  This won't work as that address is then
sent to a [remote] remsim-client that attempts to reach the bankd
at localhost.

Change-Id: I3b4eda10e81a705aef8d647a860890a74cba8f13
laforge at

#113 (Feb 27, 2026, 10:24:00 AM)

remsim-client: Don't attempt to pass on TPDU length < 5

TPDUs with length < 5 bytes are illegal in T=0.  It doesn't make sense
to send them to bankd, triggering bugs in either bankd, pcsc-lite or the
CCID firmware down the road.  Let's filter them right where they might
originate.

Change-Id: I175eb4622d0e69dbc6aca2cddfe091a78f225da5
laforge at

#112 (Feb 25, 2026, 10:34:20 AM)

bankd: csv: fix crash on invalid lines

When no valid csv line is given (e.g. without any commas),
bankd will crash when trying to compile a regex with NULL.

Change-Id: Id6059c7dd4a119ffb1658a6cd7345a40bef3a69f
lynxis at

#111 (Feb 25, 2026, 10:34:20 AM)

bankd: csv: fail on invalid csv lines

Instead of ignoring invalid regex and non-existent
regex for reader.

Change-Id: If10889b43c99adb99d0b7dcdb4287952c3a93d69
lynxis at

#110 (Feb 20, 2026, 12:32:54 PM)

Bump version: 1.1.2 → 1.1.3

Change-Id: I4ffcc7d6bba6fd86525dd93fc8c643d50d81b7f0
Oliver Smith at

#109 (Feb 20, 2026, 10:58:19 AM)

Bump version: 1.1.2 → 1.1.3

Change-Id: Ibc9d5efa85def78cfc3f1f09f0cde46aa7cfbd3c
Oliver Smith at

#108 (Feb 19, 2026, 5:35:46 PM)

rspro_server: fix releasing timed out clients

Fix crash on reconnects of clients if they timed out.

The duplicate check will use conn->peer of the old peer,
but conn->peer is NULL because rspro_client_conn_destroy() never destroys
the connection if conn->peer is valid when rspro_client_conn_destroy() is called.

void rspro_client_conn_destroy(conn)
{
if (conn->peer) {
peer = conn->peer;
conn->peer = NULL;
osmo_stream_srv_destroy(peer); /* calls sock_closed_cb()
}
[..]
}

int sock_closed_cb(peer)
{
[..]
if (conn->peer) {
osmo_fsm_inst_dispatch(conn->fi, CLNTC_E_TCP_DOWN, NULL); /* calls in the end rspro_client_conn_destroy() */
}
return 0;
}

Re-organize the clean up:
* rspro_client_conn_destroy() will be only called by the FSM clean up
* closed_cb will inform the fi to clean up

Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif")
Related: OS#6957
Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
lynxis at

#107 (Feb 17, 2026, 12:48:00 AM)

rspro_server: fix releasing timed out clients

Fix crash on reconnects of clients if they timed out.

The duplicate check will use conn->peer of the old peer,
but conn->peer is NULL because rspro_client_conn_destroy() never destroys
the connection if conn->peer is valid when rspro_client_conn_destroy() is called.

void rspro_client_conn_destroy(conn)
{
if (conn->peer) {
peer = conn->peer;
conn->peer = NULL;
osmo_stream_srv_destroy(peer); /* calls sock_closed_cb()
}
[..]
}

int sock_closed_cb(peer)
{
[..]
if (conn->peer) {
osmo_fsm_inst_dispatch(conn->fi, CLNTC_E_TCP_DOWN, NULL); /* calls in the end rspro_client_conn_destroy() */
}
return 0;
}

Fixes: 8cfe1d808a57 ("Use new osmo_ipa_ka_fsm_inst APIs from libosmo-netif")
Related: OS#6957
Change-Id: I1f7faf5ffdd909362c492ab434b63fa7e79ada95
lynxis at