[PATCH 4.14 17/95] tee: shm: fix use-after-free via temporarily dropped reference

2018-05-21 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Jann Horn commit bb765d1c331f62b59049d35607ed2e365802bef9 upstream. Bump the file's refcount before moving the reference into the fd table, not afterwards. The old code

[PATCH 4.14 17/95] tee: shm: fix use-after-free via temporarily dropped reference

2018-05-21 Thread Greg Kroah-Hartman
4.14-stable review patch. If anyone has any objections, please let me know. -- From: Jann Horn commit bb765d1c331f62b59049d35607ed2e365802bef9 upstream. Bump the file's refcount before moving the reference into the fd table, not afterwards. The old code could drop the file's