rgb-cln/contrib
Christian Decker ac6d9b34cc pylightning: Correctly return the remainder of a message back
We read a JSON message from the buffer, after converting it from raw bytes to
UTF-8, and returning the remainder of the byte array back to the
caller. However the return value of `raw_decode` refers to symbols in the
UTF-8 decoded string, not the raw bytes underlying byte-array, which means
that if we have multi-byte encoded UTF-8 symbols in the byte-array we end up
with a misaligned offset and will return part of the message as
remainder. This would then end up being interpreted as the result of the next
call.

This could not be exploited currently since we use a socket only for a single
JSON-RPC call and will close the connection afterwards, but since we want to
eventually recycle connections for multiple calls, this could have been very
dangerous.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
Reported-by: Corné Plooy <@bitonic-cjp>
2019-02-18 02:10:43 +00:00
..
init contrib: add init file for systemd 2018-08-13 23:55:12 +00:00
plugins pylightning: use different decoration for init msg. 2019-02-07 20:33:50 +00:00
pylightning pylightning: Correctly return the remainder of a message back 2019-02-18 02:10:43 +00:00
Dockerfile.builder docker: Update pytest dependencies in the builder image 2018-11-26 22:53:37 +00:00
Dockerfile.builder.fedora docker: Update docker images and docs to non-CVE-2018-17144 bitcoind 2018-10-15 23:05:25 +00:00
Dockerfile.builder.i386 docker: Update pytest dependencies in the builder image 2018-11-26 22:53:37 +00:00
lightning-cli.bash-completion contrib/lightning-cli.bash-completion: fix for new simpler help format. 2018-02-02 00:05:00 +01:00
linuxarm32v7.Dockerfile docker: Do not use the copy of a clone 2019-02-07 03:07:18 +00:00
short_channel_id-to-txid.sh contrib/short_channel_id-to-txid.sh: simple mapping util. 2018-08-21 22:53:45 +02:00