2020-04-14 16:00:58 |
Christian Brauner |
bug |
|
|
added bug |
2020-04-14 16:01:05 |
Christian Brauner |
linux (Ubuntu): assignee |
|
Christian Brauner (cbrauner) |
|
2020-04-14 16:01:27 |
Christian Brauner |
linux (Ubuntu): status |
New |
Confirmed |
|
2020-04-14 16:01:31 |
Christian Brauner |
linux (Ubuntu): status |
Confirmed |
In Progress |
|
2020-04-14 20:19:44 |
Christian Brauner |
description |
SRU Justification
Impact: Christian Kellner reported that creating temporary files via O_TMPFILE shiftfs reports ESTALE. This can be reproduced via:
import tempfile
import os
def test():
with tempfile.TemporaryFile() as fd:
fd.write("data".encode('utf-8'))
# re-open the file to get a read-only file descriptor
return open(f"/proc/self/fd/{fd.fileno()}", "r")
def main():
fd = test()
fd.close()
if __name__ == "__main__":
main()
a similar issue was reported here:
https://github.com/systemd/systemd/issues/14861
Regression Potential: Limited to shiftfs.
Test Case: Build a kernel with fix applied and run above reproducer. |
SRU Justification
Impact: Christian Kellner reported that creating temporary files via O_TMPFILE shiftfs reports ESTALE. This can be reproduced via:
import tempfile
import os
def test():
with tempfile.TemporaryFile() as fd:
fd.write("data".encode('utf-8'))
# re-open the file to get a read-only file descriptor
return open(f"/proc/self/fd/{fd.fileno()}", "r")
def main():
fd = test()
fd.close()
if __name__ == "__main__":
main()
a similar issue was reported here:
https://github.com/systemd/systemd/issues/14861
Fix: Our revalidate methods were very opinionated about whether or not a dentry was valid when we really should've just let the underlay tell us what's what. This has led to bugs where a ESTALE was returned for e.g. temporary files that were created and directly re-opened afterwards through /proc/<pid>/fd/<nr-of-deleted-file>. When a file is re-opened through /proc/<pid>/fd/<nr> LOOKUP_JUMP is set and the vfs will revalidate via d_weak_revalidate(). Since the file has been unhashed or even already gone negative we'd fail the open when we should've succeeded.
I had also foolishly provided a .tmpfile method which so far only has caused us trouble. If we really need this then we can reimplement it properly but I doubt it. Remove it for now.
Regression Potential: Limited to shiftfs.
Test Case: Build a kernel with fix applied and run above reproducer. |
|
2020-04-14 20:19:54 |
Christian Brauner |
bug |
|
|
added subscriber Ubuntu Containers Team |
2020-04-14 20:20:03 |
Christian Brauner |
bug |
|
|
added subscriber Seth Forshee |
2020-04-14 20:20:13 |
Christian Brauner |
bug |
|
|
added subscriber Christian Kellner |
2020-04-23 12:55:07 |
Kleber Sacilotto de Souza |
nominated for series |
|
Ubuntu Bionic |
|
2020-04-23 12:55:07 |
Kleber Sacilotto de Souza |
bug task added |
|
linux (Ubuntu Bionic) |
|
2020-04-23 12:55:07 |
Kleber Sacilotto de Souza |
nominated for series |
|
Ubuntu Xenial |
|
2020-04-23 12:55:07 |
Kleber Sacilotto de Souza |
bug task added |
|
linux (Ubuntu Xenial) |
|
2020-04-23 12:55:15 |
Kleber Sacilotto de Souza |
linux (Ubuntu Xenial): status |
New |
In Progress |
|
2020-04-23 12:55:17 |
Kleber Sacilotto de Souza |
linux (Ubuntu Bionic): status |
New |
In Progress |
|
2020-04-23 13:43:10 |
Kleber Sacilotto de Souza |
bug task deleted |
linux (Ubuntu Bionic) |
|
|
2020-04-23 13:43:14 |
Kleber Sacilotto de Souza |
bug task deleted |
linux (Ubuntu Xenial) |
|
|
2020-04-24 13:24:17 |
Kleber Sacilotto de Souza |
nominated for series |
|
Ubuntu Eoan |
|
2020-04-24 13:24:17 |
Kleber Sacilotto de Souza |
bug task added |
|
linux (Ubuntu Eoan) |
|
2020-04-24 13:24:17 |
Kleber Sacilotto de Souza |
nominated for series |
|
Ubuntu Focal |
|
2020-04-24 13:24:17 |
Kleber Sacilotto de Souza |
bug task added |
|
linux (Ubuntu Focal) |
|
2020-04-24 17:58:10 |
Kelsey Steele |
linux (Ubuntu Eoan): status |
New |
Fix Committed |
|
2020-04-24 17:58:12 |
Kelsey Steele |
linux (Ubuntu Focal): status |
New |
Fix Committed |
|
2020-05-01 01:22:07 |
Ubuntu Kernel Bot |
tags |
|
verification-needed-eoan |
|
2020-05-01 14:15:46 |
Christian Brauner |
tags |
verification-needed-eoan |
verification-done-eoan |
|
2020-05-06 07:12:53 |
Ubuntu Kernel Bot |
tags |
verification-done-eoan |
verification-done-eoan verification-needed-focal |
|
2020-05-15 10:53:34 |
Christian Brauner |
tags |
verification-done-eoan verification-needed-focal |
verification-done-eoan verification-done-focal |
|
2020-05-17 23:17:06 |
Christian Brauner |
linux (Ubuntu): status |
In Progress |
Fix Committed |
|
2020-05-19 00:17:21 |
Launchpad Janitor |
linux (Ubuntu Focal): status |
Fix Committed |
Fix Released |
|
2020-05-19 21:37:06 |
Launchpad Janitor |
linux (Ubuntu Eoan): status |
Fix Committed |
Fix Released |
|
2020-05-19 21:37:06 |
Launchpad Janitor |
cve linked |
|
2020-11494 |
|
2020-05-19 21:37:06 |
Launchpad Janitor |
cve linked |
|
2020-11608 |
|
2020-07-28 00:57:39 |
Launchpad Janitor |
linux (Ubuntu): status |
Fix Committed |
Fix Released |
|
2020-07-28 00:57:39 |
Launchpad Janitor |
cve linked |
|
2019-16089 |
|
2020-07-28 00:57:39 |
Launchpad Janitor |
cve linked |
|
2019-19642 |
|
2020-07-28 00:57:39 |
Launchpad Janitor |
cve linked |
|
2020-11935 |
|