Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connectd: fix crash on freed context for new connections. #6070

Merged

Commits on Mar 6, 2023

  1. connectd: fix crash on freed context for new connections.

    ccan/io stores the context pointer for io_new_conn, but we were using
    `daemon->listeners` which we reallocate, so it can use a stale pointer.
    
    ```
    0x3e1700 call_error
    	ccan/ccan/tal/tal.c:93
    0x3e1700 check_bounds
    	ccan/ccan/tal/tal.c:165
    0x3e1700 to_tal_hdr
    	ccan/ccan/tal/tal.c:174
    0x3e1211 to_tal_hdr_or_null
    	ccan/ccan/tal/tal.c:186
    0x3e1211 tal_alloc_
    	ccan/ccan/tal/tal.c:426
    0x3db8f4 io_new_conn_
    	ccan/ccan/io/io.c:91
    0x3dd2e1 accept_conn
    	ccan/ccan/io/poll.c:277
    0x3dd2e1 io_loop
    	ccan/ccan/io/poll.c:444
    0x3419fa main
    	connectd/connectd.c:2081
    ```
    
    Fixes: ElementsProject#6060
    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    f150277 View commit details
    Browse the repository at this point in the history