Skip to content
Snippets Groups Projects
Select Git revision
  • 040757f738e13caaa9c5078bca79aa97e11dde88
  • openEuler-1.0-LTS default protected
  • openEuler-22.09
  • OLK-5.10
  • openEuler-22.03-LTS
  • openEuler-22.03-LTS-Ascend
  • master
  • openEuler-22.03-LTS-LoongArch-NW
  • openEuler-22.09-HCK
  • openEuler-20.03-LTS-SP3
  • openEuler-21.09
  • openEuler-21.03
  • openEuler-20.09
  • 4.19.90-2210.5.0
  • 5.10.0-123.0.0
  • 5.10.0-60.63.0
  • 5.10.0-60.62.0
  • 4.19.90-2210.4.0
  • 5.10.0-121.0.0
  • 5.10.0-60.61.0
  • 4.19.90-2210.3.0
  • 5.10.0-60.60.0
  • 5.10.0-120.0.0
  • 5.10.0-60.59.0
  • 5.10.0-119.0.0
  • 4.19.90-2210.2.0
  • 4.19.90-2210.1.0
  • 5.10.0-118.0.0
  • 5.10.0-106.19.0
  • 5.10.0-60.58.0
  • 4.19.90-2209.6.0
  • 5.10.0-106.18.0
  • 5.10.0-106.17.0
33 results

kernel

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Eric W. Biederman authored
    Always increment/decrement ucount->count under the ucounts_lock.  The
    increments are there already and moving the decrements there means the
    locking logic of the code is simpler.  This simplification in the
    locking logic fixes a race between put_ucounts and get_ucounts that
    could result in a use-after-free because the count could go zero then
    be found by get_ucounts and then be freed by put_ucounts.
    
    A bug presumably this one was found by a combination of syzkaller and
    KASAN.  JongWhan Kim reported the syzkaller failure and Dmitry Vyukov
    spotted the race in the code.
    
    Cc: stable@vger.kernel.org
    Fixes: f6b2db1a ("userns: Make the count of user namespaces per user")
    Reported-by: default avatarJongHwan Kim <zzoru007@gmail.com>
    Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
    Reviewed-by: default avatarAndrei Vagin <avagin@gmail.com>
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    040757f7
    History
    Name Last commit Last update
    ..