Bug 14671 - s3:modules:vfs_virusfilter:vfs_virusfilter_openat breaks with recent VFS changes
Summary: s3:modules:vfs_virusfilter:vfs_virusfilter_openat breaks with recent VFS changes
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.14.0
Hardware: All All
: P5 major (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
Depends on:
Reported: 2021-03-13 19:58 UTC by Trever Adams
Modified: 2021-04-20 10:10 UTC (History)
2 users (show)

See Also:

necessary VFS patch for vfs_virusfilter vs 4.14.0 (877 bytes, patch)
2021-03-13 20:34 UTC, Trever Adams
no flags Details
git-am fix for 4.14.next. (1.94 KB, patch)
2021-03-22 21:06 UTC, Jeremy Allison
npower: review+

Note You need to log in before you can comment on or make changes to this bug.
Description Trever Adams 2021-03-13 19:58:17 UTC
I am sorry I didn't catch this sooner. the _openat function breaks in a few key ways. The assert no longer works. In fixing this I believe I have also fixed an upcoming problem by changing to using the SMB_VFS_FSTAT_NEXT function instead of _STAT_NEXT.

I will push the patch shortly. It has been tested. I do worry if this is backportable to before 4.14.0. I also wonder if these changes will work as intended as I do not have a setup where the backing system does not have actual FDs which is what is needed for this module to work properly.

[2021/03/13 11:48:50.505469,  0] ../../source3/lib/dumpcore.c:317(dump_core)
  coredump is handled by helper binary specified at /proc/sys/kernel/core_pattern
[2021/03/13 11:51:53.955497,  0] ../../source3/modules/vfs_virusfilter.c:1245(virusfilter_vfs_openat)
  PANIC: assert failed at ../../source3/modules/vfs_virusfilter.c(1245): fsp_get_pathref_fd(dirfsp) == AT_FDCWD
[2021/03/13 11:51:53.957585,  0] ../../lib/util/fault.c:172(smb_panic_log)
Comment 1 Trever Adams 2021-03-13 20:34:38 UTC
Created attachment 16541 [details]
necessary VFS patch for vfs_virusfilter vs 4.14.0

This patch is currently working on my systems and has passed initial build in pipeline.
Comment 2 Trever Adams 2021-03-15 07:53:14 UTC
The merge request can be found at https://gitlab.com/samba-team/samba/-/merge_requests/1840
Comment 3 Samba QA Contact 2021-03-22 19:45:09 UTC
This bug was referenced in samba master:

Comment 4 Jeremy Allison 2021-03-22 21:06:00 UTC
Created attachment 16563 [details]
git-am fix for 4.14.next.

Cherry-pick from master.
Comment 5 Jeremy Allison 2021-03-23 16:53:11 UTC
Re-assigning to Karolin for inclusion in 4.14.next.
Comment 6 Karolin Seeger 2021-03-31 09:08:49 UTC
(In reply to Jeremy Allison from comment #5)
Pushed to autobuild-v4-14-test.
Comment 7 Samba QA Contact 2021-03-31 11:11:28 UTC
This bug was referenced in samba v4-14-test:

Comment 8 Karolin Seeger 2021-04-01 10:29:41 UTC
Closing out bug report.

Comment 9 Samba QA Contact 2021-04-20 10:10:07 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.3):