Bug 6317 - include cycles trigger infinte loop and segfault
include cycles trigger infinte loop and segfault
Status: RESOLVED FIXED
Product: Samba 3.3
Classification: Unclassified
Component: Config Files
3.3.4
Other All
: P3 normal
: ---
Assigned To: Michael Adam
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-04 08:29 UTC by Michael Adam
Modified: 2009-05-06 02:30 UTC (History)
2 users (show)

See Also:


Attachments
patch for the bug (2.72 KB, patch)
2009-05-05 07:22 UTC, Michael Adam
no flags Details
updated patch (2.00 KB, patch)
2009-05-05 09:39 UTC, Michael Adam
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Adam 2009-05-04 08:29:27 UTC
Any cycle in the config-file-tree structure (created with include statements) makes samba progams loop until a segfault happens due to exhausted stack.

This also applies to "include = registry".

This is present in all versions of Samba3, but it has already been fixed in
3.4 and master.
Comment 1 Michael Adam 2009-05-05 07:22:53 UTC
Created attachment 4118 [details]
patch for the bug

Attached find a git patch (mbox) comprised of two commits that fixes the bug.
To be applied with git am.
I would like to get this into the next 3.3 bugfix release.

Michael
Comment 2 Volker Lendecke 2009-05-05 08:26:38 UTC
What about just adding the pure bug-fix one to 3-3? The fact that we get 100 error messages is annoying, but it's better than smbd crashing. And I would guess that it's pretty unlikely that someone actually has this broken config around.

Volker
Comment 3 Michael Adam 2009-05-05 09:37:49 UTC
(In reply to comment #2)
> What about just adding the pure bug-fix one to 3-3? The fact that we get 100
> error messages is annoying, but it's better than smbd crashing. And I would
> guess that it's pretty unlikely that someone actually has this broken config
> around.

Agreed, the second patch is purely cosmetic.
Comment 4 Michael Adam 2009-05-05 09:39:04 UTC
Created attachment 4119 [details]
updated patch

Updated git-formatted patch: just the actual bugfix without DEBUG level cosmetics.

Michael
Comment 5 Michael Adam 2009-05-05 14:40:44 UTC
Volker, can I take your comment #2 as +1 for the updated patch? :-)
Comment 6 Volker Lendecke 2009-05-05 14:46:17 UTC
Yes, +1 on the single one :-)

Volker
Comment 7 Karolin Seeger 2009-05-06 02:30:39 UTC
Patch is upstream. Will be included in 3.3.5.
Closing out bug report.