setting extended attribute may cause memory leak

Bug #1924611 reported by Thadeu Lima de Souza Cascardo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Fix Released
Critical
Thadeu Lima de Souza Cascardo
Bionic
Invalid
Undecided
Unassigned
Focal
Invalid
Undecided
Unassigned
linux-gke-5.3 (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Fix Released
Critical
Thadeu Lima de Souza Cascardo
Focal
Invalid
Undecided
Unassigned
linux-hwe (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Fix Released
Critical
Unassigned
Focal
Invalid
Undecided
Unassigned
linux-oem-5.6 (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Invalid
Undecided
Unassigned
Focal
Fix Released
Critical
Thadeu Lima de Souza Cascardo
linux-raspi2-5.3 (Ubuntu)
Invalid
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Fix Released
Critical
Thadeu Lima de Souza Cascardo
Focal
Invalid
Undecided
Unassigned

Bug Description

[Impact]
A memory leak may happen when an error happens when setting extended attributes.

[Fix]
The issue was introduced by an improper backport, so the fix is specific to Ubuntu, so a SAUCE patch.

[Test case]
Test setting attribute under a user namespace.

[Regression potential]
A double free bug might be introduced. Or setting extended attributes might fail.

Changed in linux (Ubuntu Xenial):
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
Changed in linux (Ubuntu):
status: New → Invalid
Changed in linux-oem-5.6 (Ubuntu):
status: New → Invalid
Changed in linux (Ubuntu Focal):
status: New → Invalid
Changed in linux-oem-5.6 (Ubuntu Xenial):
status: New → Invalid
Changed in linux-oem-5.6 (Ubuntu Focal):
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
Changed in linux (Ubuntu Bionic):
status: New → Invalid
Changed in linux-oem-5.6 (Ubuntu Bionic):
status: New → Invalid
Changed in linux-gke-5.3 (Ubuntu):
status: New → Invalid
Changed in linux-gke-5.3 (Ubuntu Xenial):
status: New → Invalid
Changed in linux-gke-5.3 (Ubuntu Focal):
status: New → Invalid
Changed in linux-gke-5.3 (Ubuntu Bionic):
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
importance: Undecided → Critical
status: New → Triaged
Changed in linux-raspi2-5.3 (Ubuntu):
status: New → Invalid
Changed in linux-raspi2-5.3 (Ubuntu Xenial):
status: New → Invalid
Changed in linux-raspi2-5.3 (Ubuntu Focal):
status: New → Invalid
Changed in linux-raspi2-5.3 (Ubuntu Bionic):
assignee: nobody → Thadeu Lima de Souza Cascardo (cascardo)
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Stefan Bader (smb) wrote :

The parent for bionic:linux-gke-5.3 and bionic:linux-raspi2-5.3 is bionic:linux-hwe (I did not want to decide this myself but the former 2 could be dropped from this report).

Changed in linux-oem-5.6 (Ubuntu Focal):
status: Triaged → Fix Committed
Changed in linux-hwe (Ubuntu Bionic):
status: New → Invalid
Changed in linux-hwe (Ubuntu Focal):
status: New → Invalid
Changed in linux-hwe (Ubuntu Bionic):
importance: Undecided → Critical
status: Invalid → Fix Committed
Changed in linux-hwe (Ubuntu Xenial):
status: New → Invalid
Changed in linux (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
tags: added: verification-needed-bionic
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

$ uname -a
Linux bionic 5.3.0-74-generic #70-Ubuntu SMP Fri Apr 16 08:44:31 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ ./leak.sh
$ echo $?
0
$

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

For bionic:linux-hwe, the same patch was applied, so we can rely on the xenial verification for that.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

$ uname -a
Linux bionic 5.3.0-1043-gke #46-Ubuntu SMP Fri Apr 16 09:14:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ ./leak.sh
$ echo $?
0
$

Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

$ uname -a
Linux focal 5.6.0-1055-oem #59-Ubuntu SMP Fri Apr 16 08:43:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ ./leak.sh
$ echo $?
0
$

Changed in linux-hwe (Ubuntu):
status: New → Invalid
tags: added: verification-done-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-gke-5.3 - 5.3.0-1043.46

---------------
linux-gke-5.3 (5.3.0-1043.46) bionic; urgency=medium

  * bionic/linux-gke-5.3: 5.3.0-1043.46 -proposed tracker (LP: #1924650)

  [ Ubuntu: 5.3.0-74.70 ]

  * bionic/linux-hwe: 5.3.0-74.70 -proposed tracker (LP: #1924647)
  * setting extended attribute may cause memory leak (LP: #1924611)
    - SAUCE: vfs_setxattr: free converted value if xattr_permission returns error

 -- Stefan Bader <email address hidden> Fri, 16 Apr 2021 10:57:46 +0200

Changed in linux-gke-5.3 (Ubuntu Bionic):
status: Triaged → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-hwe - 5.3.0-74.70

---------------
linux-hwe (5.3.0-74.70) bionic; urgency=medium

  * bionic/linux-hwe: 5.3.0-74.70 -proposed tracker (LP: #1924647)

  * setting extended attribute may cause memory leak (LP: #1924611)
    - SAUCE: vfs_setxattr: free converted value if xattr_permission returns error

 -- Stefan Bader <email address hidden> Fri, 16 Apr 2021 10:22:31 +0200

Changed in linux-hwe (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-raspi2-5.3 - 5.3.0-1040.42

---------------
linux-raspi2-5.3 (5.3.0-1040.42) bionic; urgency=medium

  * bionic/linux-raspi2-5.3: 5.3.0-1040.42 -proposed tracker (LP: #1924651)

  [ Ubuntu: 5.3.0-74.70 ]

  * bionic/linux-hwe: 5.3.0-74.70 -proposed tracker (LP: #1924647)
  * setting extended attribute may cause memory leak (LP: #1924611)
    - SAUCE: vfs_setxattr: free converted value if xattr_permission returns error

 -- Stefan Bader <email address hidden> Fri, 16 Apr 2021 11:13:35 +0200

Changed in linux-raspi2-5.3 (Ubuntu Bionic):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 4.4.0-210.242

---------------
linux (4.4.0-210.242) xenial; urgency=medium

  * xenial/linux: 4.4.0-210.242 -proposed tracker (LP: #1924644)

  * setting extended attribute may cause memory leak (LP: #1924611)
    - SAUCE: vfs_setxattr: free converted value if xattr_permission returns error

 -- Stefan Bader <email address hidden> Fri, 16 Apr 2021 11:33:09 +0200

Changed in linux (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-oem-5.6 - 5.6.0-1055.59

---------------
linux-oem-5.6 (5.6.0-1055.59) focal; urgency=medium

  * focal/linux-oem-5.6: 5.6.0-1055.59 -proposed tracker (LP: #1924646)

  * setting extended attribute may cause memory leak (LP: #1924611)
    - SAUCE: vfs_setxattr: free converted value if xattr_permission returns error

 -- Stefan Bader <email address hidden> Fri, 16 Apr 2021 10:28:23 +0200

Changed in linux-oem-5.6 (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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