longpath test in the apparmor test failed with permission denied

Bug #1768784 reported by Po-Hsu Lin
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
QA Regression Testing
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

THIS IS A POTENTIAL REGRESSION

The ubuntu_qrt_apparmor test suite has passed with the kernel in -released (4.4.0-121) but not the one in -proposed (4.4.0-123)

longpath test in the test_regression_testsuite will fail with:
  running longpath
  longpath.sh: line 53: /sys/module/apparmor/parameters/path_max: Permission denied
  Fatal Error (longpath): Unexpected shell error. Run with -x to debug

This issue can be spotted both on Xenial kernel and the Xenial kernel on Trusty.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-4.4.0-123-generic 4.4.0-123.147~14.04.1
ProcVersionSignature: User Name 4.4.0-123.147~14.04.1-generic 4.4.128
Uname: Linux 4.4.0-123-generic i686
ApportVersion: 2.14.1-0ubuntu3.27
Architecture: i386
Date: Thu May 3 08:55:33 2018
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-lts-xenial
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
affects: linux-lts-xenial (Ubuntu) → linux (Ubuntu)
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

The file property has changed from 4.4.0-121 to 4.4.0-123

* 4.4.0-121:
$ ll /sys/module/apparmor/parameters/path_max
-rw-r--r-- 1 root root 4096 May 3 09:11 /sys/module/apparmor/parameters/path_max

* 4.4.0-123:
$ ll /sys/module/apparmor/parameters/path_max
-r--r--r-- 1 root root 4096 May 3 08:23 /sys/module/apparmor/parameters/path_max

This might be the cause of this permission denied issue.

So maybe it's the tool that needs some modification, I will add the qa-regression-testing project to this bug as well.

tags: added: xenial
removed: trusty
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1768784

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: trusty
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

BTW, the kernel mentioned in comment #2 are the 4.4 kernel on Trusty.

Revision history for this message
Stefan Bader (smb) wrote :

commit 97c2cc241498c60c0f4b18d06325ea7f924782c4
Author: John Johansen <email address hidden>
Date: Thu Apr 6 06:55:24 2017 -0700

    apparmor: Make path_max parameter readonly

    BugLink: http://bugs.launchpad.net/bugs/1764666

    [ Upstream commit 622f6e3265707ebf02ba776ac6e68003bcc31213 ]

    The path_max parameter determines the max size of buffers allocated
    but it should not be setable at run time. If can be used to cause an
    oops

An apparmor change that came back via upstream stable v4.4.123.

Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Stefan Bader (smb) wrote :

Oh actually that makes it invalid against the kernel package but I leave that to you.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Fixed the test-apparmor.py qrt script to always apply the longpath test fix that makes sure path_max is writable before testing, and if not, XFAILs the test. This is in qrt commit https://git.launchpad.net/qa-regression-testing/commit/?id=99de7d240dc3e96a9b03cf9924c43f1aa0bd3c40 .

Thanks!

Changed in linux (Ubuntu):
status: Triaged → Invalid
Changed in qa-regression-testing:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.