execveat03 in ubuntu_ltp_syscalls failed on X/B
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-kernel-tests |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
linux (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Po-Hsu Lin | ||
Bionic |
Fix Released
|
Undecided
|
Po-Hsu Lin |
Bug Description
== Justification ==
The code in cap_inode_
("Introduce v3 namespaced file capabilities"), should use
d_find_any_alias() instead of d_find_alias() do handle unhashed dentry
correctly. This is needed, for example, if execveat() is called with an
open but unlinked overlayfs file, because overlayfs unhashes dentry on
unlink.
This is a regression of real life application, first reported at
https:/
With the execveat03 test in the LTP test suite on an affected kernel, it will fail with:
<<<test_start>>>
tag=execveat03 stime=1534135632
cmdline=
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tst_test.c:1017: INFO: Timeout per run is 0h 05m 00s
execveat03.c:70: FAIL: execveat() returned unexpected errno: EINVAL
Summary:
passed 0
failed 1
skipped 0
warnings 0
== Fix ==
355139a8 (cap_inode_
d_find_alias())
It can be cherry-picked for Bionic, but it needs to be backported to Xenial along with the logic when we backport 8db6c34f1dbc (bug 1778286).
The test kernel for Xenial / Bionic could be found here:
http://
This patch has already been cherry-picked into Cosmic and Unstable.
== Regression Potential ==
Low, this patch just uses a correct function to handle unhashed dentry, and it's been applied in both upstream and our newer kernel.
== Test Case ==
Run the reproducer in the commit message, or,
run the execveat03 test in ubuntu_ltp_syscalls test suite. And it will pass with the patched kernel.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-
ProcVersionSign
Uname: Linux 4.4.0-1064-aws x86_64
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: amd64
Date: Mon Aug 13 04:51:09 2018
Ec2AMI: ami-529fb82a
Ec2AMIManifest: (unknown)
Ec2Availability
Ec2InstanceType: x1e.xlarge
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
SourcePackage: linux-aws
UpgradeStatus: No upgrade log present (probably fresh install)
CVE References
no longer affects: | ubuntu-kernel-tests |
Changed in ubuntu-kernel-tests: | |
status: | Incomplete → Confirmed |
description: | updated |
Changed in ubuntu-kernel-tests: | |
status: | Confirmed → In Progress |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in linux (Ubuntu Xenial): | |
status: | New → In Progress |
Changed in linux (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in linux (Ubuntu Xenial): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
Changed in linux (Ubuntu Bionic): | |
assignee: | nobody → Po-Hsu Lin (cypressyew) |
description: | updated |
description: | updated |
description: | updated |
Changed in linux (Ubuntu Xenial): | |
status: | In Progress → Fix Committed |
Changed in linux (Ubuntu Bionic): | |
status: | In Progress → Fix Committed |
no longer affects: | linux-aws (Ubuntu) |
no longer affects: | linux-aws (Ubuntu Xenial) |
no longer affects: | linux-aws (Ubuntu Bionic) |
Changed in ubuntu-kernel-tests: | |
status: | In Progress → Fix Released |
tags: | added: cscc |
As expected, this failure could be found in generic kernel as well.