git: socket: Fix soabort() race if crfree() blocks in soinherit().

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Wed Aug 12 18:38:23 PDT 2015


commit 838d26827a791d405195ac3e780eae1eb7d3dc0e
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Thu Aug 13 09:30:23 2015 +0800

    socket: Fix soabort() race if crfree() blocks in soinherit().
    
    In soinherit(), if the accepted socket was on the temp list
    and crfree() blocked, the owner netisr's soabort() would cause
    use-after-free.
    
    After this commit, we move one accepted socket each time, so
    that the potential blocking crfree() will not cause trouble
    for us.  And we no longer allow inheritting incomplete queue,
    which could be dropped by definition.
    
    Pointed-out-by: dillon@

Summary of changes:
 sys/kern/uipc_socket.c | 94 ++++++++++++++++++++++++--------------------------
 1 file changed, 46 insertions(+), 48 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/838d26827a791d405195ac3e780eae1eb7d3dc0e


-- 
DragonFly BSD source repository


More information about the Commits mailing list