Big samba memory leak fixed upstream
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bionic |
Fix Released
|
High
|
Andreas Hasenack |
Bug Description
[Impact]
There is a memory leak in vfswrap_getwd() that, depending on the server usage, can become severe and trigger an OOM killer.
[Test Case]
It's hard to come up with a test case for memory leaks, because they can take a while to manifest.
[Regression Potential]
Patch is sane and has been applied upstream. It's already present in cosmic and later. The code that frees the pointer is only reached if the pointer isn't NULL.
[Other Info]
None at this time.
[Original Description]
There is a big memory leak bug in Samba 4.1 - 4.7.6. Depending on the circumstances all memory of the Ubuntu server will be eaten by Samba sooner or later. Then Linux Oom - killer will kill Samba which will either restart or hang.
On our Ubuntu Server 14.04.5 I need to restart Samba 1 - 2 times a week. This bug probably affects also Ubuntu 18.04 if this fix has not yet been backported.
This bug has been fixed upstream in Samba 4.7.7. The fix is only two lines of code and the bug is caused by a single misplaced "if" when releasing memory.
This upstream commit fixes the bug: https:/
This is the Samba bug report: https:/
And here the author apologizes for the bug :) https:/
Please backport this fix to Ubuntu 14.04 and 18.04, thanks :)
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: samba 2:4.3.11+
ProcVersionSign
Uname: Linux 3.13.0-164-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.29
Architecture: amd64
BothFailedConnect: Yes
Date: Mon Feb 4 11:34:06 2019
InstallationDate: Installed on 2014-09-25 (1592 days ago)
InstallationMedia: Ubuntu-Server 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.3)
SambaServerRegr
SmbConfIncluded: No
SourcePackage: samba
UpgradeStatus: No upgrade log present (probably fresh install)
upstart.
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
-
Diff: 74 lines (+52/-0)3 files modifieddebian/changelog (+7/-0)
debian/patches/memleak-fix-13372.patch (+44/-0)
debian/patches/series (+1/-0)
Changed in samba (Ubuntu): | |
importance: | Undecided → High |
description: | updated |
Changed in samba (Ubuntu Bionic): | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: server-next |
description: | updated |
description: | updated |
Thank you for your bug report, according to the upstream discussion the issue was create by that commit /github. com/samba- team/samba/ commit/ bd9285b1 and looks like a good candidate for a bionic SRU, it shouldn't apply/be an issue on trusty though which has 4.1/4.3 samba series
https:/