Bug 9471 - SEGV when using second vfs module
SEGV when using second vfs module
Status: RESOLVED FIXED
Product: Samba 3.6
Classification: Unclassified
Component: VFS Modules
3.6.9
All All
: P5 major
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-06 12:01 UTC by Tsukasa HAMANO
Modified: 2012-12-10 08:47 UTC (History)
2 users (show)

See Also:


Attachments
patch for 3.6.9 (453 bytes, patch)
2012-12-06 12:01 UTC, Tsukasa HAMANO
no flags Details
git-am fix that went into master. (1.05 KB, patch)
2012-12-07 17:50 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tsukasa HAMANO 2012-12-06 12:01:09 UTC
Hi, I encountered the bug when using second vfs module.

Reproduce conditions are:
- using more than one vfs module
- debug class = yes

Segmentation fault happened when debug logging.

lib/util/debug.c:
@@ -953,7 +953,7 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
            slprintf(header_str + hs_len,
                 sizeof(header_str) -1 - hs_len,
                 ", class=%s",
                 default_classname_table[cls]);

default_classname_table array size=20, and terminated NULL.
The first vfs module level=20. then output class=(null)
At this point, something wrong.
The second vfs module level=21. then brew up SEGV.

please apply the patch.
Thank you.
Comment 1 Tsukasa HAMANO 2012-12-06 12:01:50 UTC
Created attachment 8293 [details]
patch for 3.6.9
Comment 2 Tsukasa HAMANO 2012-12-06 12:25:53 UTC
error in writing:
> The first vfs module level=20. then output class=(null)
> The second vfs module level=21. then brew up SEGV.

The first vfs module cls=20. then output class=(null)
The second vfs module cls=21. then brew up SEGV.
Comment 3 Jeremy Allison 2012-12-06 20:51:59 UTC
Looks completely correct - thanks ! I'll get it pushed to master then applied to 3.6.x and 4.0.0.

Jeremy.
Comment 4 Jeremy Allison 2012-12-07 17:50:20 UTC
Created attachment 8304 [details]
git-am fix that went into master.

This is the patch that went into master. Applies cleanly to 3.6.x and 4.0.0.

Reviewed by Jeremy and Michael.
Comment 5 Jeremy Allison 2012-12-07 17:50:50 UTC
Re-assigning to Karolin for inclusion in 4.0.0 and 3.6.x.

Jeremy.
Comment 6 Karolin Seeger 2012-12-09 19:05:20 UTC
Pushed to autobuild-v4-0-test.

Needs to be pushed to v3-6-test after the release tomorrow (branch is closed).
Comment 7 Karolin Seeger 2012-12-10 07:45:50 UTC
Pushed to v4-0-test.
Comment 8 Karolin Seeger 2012-12-10 08:47:44 UTC
Pushed to v3-6-test. Will be included in Samba 3.6.11 and 4.0.0.
Closing out bug report.

Thanks!