Bug 14596 - vfs_fruit may close wrong backend fd
Summary: vfs_fruit may close wrong backend fd
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-11 12:24 UTC by Ralph Böhme
Modified: 2021-01-29 13:54 UTC (History)
3 users (show)

See Also:


Attachments
git-am fix for 4.13.next. (10.61 KB, patch)
2021-01-08 22:10 UTC, Jeremy Allison
slow: review-
Details
Patch for 4.12 backported from master (9.55 KB, patch)
2021-01-11 11:24 UTC, Ralph Böhme
jra: review+
Details
Patch for 4.13 backported from master (9.57 KB, patch)
2021-01-11 11:24 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2020-12-11 12:24:26 UTC
When creating backend data for certain streams, fruit initially opens an internal "fake-fd" (a pipe() fd).

Unfortunately when closing these fake-fds, it calls into SMB_VFS_NEXT_CLOSE() which will lead to strange results with virtual filesystems like vfs_cephfs.

Have fix, need bugnumber.
Comment 1 Samba QA Contact 2021-01-08 21:39:05 UTC
This bug was referenced in samba master:

8f057333466b2d9845cd8bc2b794d98252ade2a4
719c83b4dc4cef16429ec2803621039545f6885e
40e70cbd3c3a1df9205a7b18d07784c1754cc340
36eb30fd7d4b82bffd0e1ab471c088f678d700a4
c5da08422990dfc1e082bc01aa10d6e415eebe3f
564b62a6f7c0a9b9712946d723118122b9c3785f
Comment 2 Jeremy Allison 2021-01-08 22:10:46 UTC
Created attachment 16387 [details]
git-am fix for 4.13.next.

Ralph, please check. Patch was back-ported from what went into master.

Do we also need this for 4.12.next ?
Comment 3 Ralph Böhme 2021-01-11 11:21:43 UTC
Comment on attachment 16387 [details]
git-am fix for 4.13.next.

s4:torture/fruit: avoid sleep(10000000); if write_stream() fails

should not be part of the patchset.
Comment 4 Ralph Böhme 2021-01-11 11:24:34 UTC
Created attachment 16388 [details]
Patch for 4.12 backported from master
Comment 5 Ralph Böhme 2021-01-11 11:24:59 UTC
Created attachment 16389 [details]
Patch for 4.13 backported from master
Comment 6 Jeremy Allison 2021-01-11 17:16:07 UTC
Thanks Ralph ! Re-assigning to Karolin for inclusion in 4.13.next, 4.12.next.
Comment 7 Karolin Seeger 2021-01-12 12:31:24 UTC
(In reply to Jeremy Allison from comment #6)
Pushed to autobuild-v4-{13,12}-test.
Comment 8 Samba QA Contact 2021-01-13 13:45:04 UTC
This bug was referenced in samba v4-12-test:

83bd07f3806d212a3051e02897fdceb36557d78b
cbdd15c13aa89834b11dc5ec9c6f23cdab692aeb
1bd5ffc109b426903aca8bb913dc504e3e8dbb0d
00b37ef3cdf78236dbd2289e702a3fca89dba1a6
8a77dcd69358a3f16ae7a93f9e7f606967ab2951
121fbf80523e4456a0fc068e08b0e6379d39200d
Comment 9 Samba QA Contact 2021-01-13 14:46:04 UTC
This bug was referenced in samba v4-13-test:

a01b3646a540fb982c661a2550c5bfb49f62aa2f
15e4e106fe4c5a2310151dc4f88f25216306fa96
124a7dc068045362428dada609a41162455a6ff5
800a3dae9126bcacdc0b21f0b71dc38d94e3faa9
0391c7b55ff2810cbd3847700bf2183d86167d14
fdeba3944443ac7d7488413f252d8b4b2efe0485
Comment 10 Samba QA Contact 2021-01-14 08:34:35 UTC
This bug was referenced in samba v4-12-stable (Release samba-4.12.11):

83bd07f3806d212a3051e02897fdceb36557d78b
cbdd15c13aa89834b11dc5ec9c6f23cdab692aeb
1bd5ffc109b426903aca8bb913dc504e3e8dbb0d
00b37ef3cdf78236dbd2289e702a3fca89dba1a6
8a77dcd69358a3f16ae7a93f9e7f606967ab2951
121fbf80523e4456a0fc068e08b0e6379d39200d
Comment 11 Karolin Seeger 2021-01-14 08:44:41 UTC
Closing out bug report.

Thanks!
Comment 12 Samba QA Contact 2021-01-29 13:54:22 UTC
This bug was referenced in samba v4-13-stable (Release samba-4.13.4):

a01b3646a540fb982c661a2550c5bfb49f62aa2f
15e4e106fe4c5a2310151dc4f88f25216306fa96
124a7dc068045362428dada609a41162455a6ff5
800a3dae9126bcacdc0b21f0b71dc38d94e3faa9
0391c7b55ff2810cbd3847700bf2183d86167d14
fdeba3944443ac7d7488413f252d8b4b2efe0485