lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 7 Oct 2017 09:36:48 +0800
From:   Jia-Ju Bai <baijiaju1990@....com>
To:     bcrl@...ck.org, Al Viro <viro@...iv.linux.org.uk>
Cc:     linux-aio@...ck.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [BUG] fs/aio: A possible sleep-in-atomic bug in aio_migratepage

According to fs/aio.c, cond_resched is called under a spinlock,
and the function call path is:
aio_migratepage (acquire the spinlock)
   migrate_page_copy
     copy_huge_page
       __copy_gigantic_page
         cond_resched
           might_sleep

This bug is found by my static analysis tool and my code review.
A possible fix is to remove cond_resched in __copy_gigantic_page.


Thanks,
Jia-Ju Bai


Powered by blists - more mailing lists