1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/source3
Noel Power 6ee3f809a5 s3/smbd: If we fail to close file_handle ensure we should reset the fd
if fsp_flags.fstat_before_close == true then close_file_smb will call
vfs_stat which can fail. If it does fail then the fd associated
with the file handle will still be set (and we will hit an assert
is the file handle destructor) when calling file_free.
We need to set fd to -1 to avoid that. To achieve that we capture and
return the vfs_stat_fsp failure status while still processing the rest
of the fd_close logic.

[2024/02/20 09:23:48.454671,  0, pid=9744] ../../source3/smbd/smb2_close.c:226(smbd_smb2_close)
  smbd_smb2_close: close_file[]: NT_STATUS_ACCESS_DENIED
[2024/02/20 09:23:48.454757,  0, pid=9744] ../../source3/smbd/fd_handle.c:40(fd_handle_destructor)
  PANIC: assert failed at ../../source3/smbd/fd_handle.c(40): (fh->fd == -1) || (fh->fd == AT_FDCWD)
[2024/02/20 09:23:48.454781,  0, pid=9744] ../../lib/util/fault.c:178(smb_panic_log)
  ===============================================================
[2024/02/20 09:23:48.454804,  0, pid=9744] ../../lib/util/fault.c:185(smb_panic_log)
  INTERNAL ERROR: assert failed: (fh->fd == -1) || (fh->fd == AT_FDCWD) in smbd (smbd[192.168.10) (client [192.168.100.15]) pid 9744 (4.21.0pre1-DEVELOPERBUILD)
[2024/02/20 09:23:48.454844,  0, pid=9744] ../../lib/util/fault.c:190(smb_panic_log)
  If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
[2024/02/20 09:23:48.454869,  0, pid=9744] ../../lib/util/fault.c:191(smb_panic_log)

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15527
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Mar 13 10:34:45 UTC 2024 on atb-devel-224
2024-03-13 10:34:45 +00:00
..
auth s3:auth: Allow 'Unix Users' and 'Unix Groups' to create a local token 2023-12-01 08:06:44 +00:00
build
client s3/libsmb: reuse smbXcli_conn_have_posix() 2023-10-26 15:29:29 +00:00
exports
groupdb s3:groupdb: Add missing newline to logging message 2023-08-08 04:39:38 +00:00
include smbd: Remove get_Protocol() 2024-03-12 13:31:31 +00:00
intl
lib smbd: Avoid a ZERO_STRUCT() with direct struct initialization 2024-03-12 14:33:14 +00:00
libads s3:libads: Trace ldap search base/filter/scope 2024-02-29 01:31:31 +00:00
libgpo/gpext
libnet s3:libnet: Remove always‐false comparison (CID 241309) 2023-10-13 02:18:31 +00:00
librpc smbd: Fix a typo 2024-03-12 13:31:31 +00:00
libsmb libsmb: Simplify an if-condition 2024-03-12 13:31:31 +00:00
locale s3:utils: Fix code spelling 2023-08-08 04:39:38 +00:00
locking libcli/security: Rename dup_nt_token() -> security_token_duplicate() 2023-09-26 23:45:36 +00:00
modules vfs: Fix a typo 2024-03-12 13:31:31 +00:00
nmbd VERSION: move COPYRIGHT_STARTUP_MESSAGE as SAMBA_COPYRIGHT_STRING into version.h 2023-12-15 10:44:42 +00:00
param s3:param: Remove unnecessary use of discard_const_p() 2023-12-21 20:21:34 +00:00
passdb s3:passdb: Reformat long line 2024-02-16 02:41:36 +00:00
printing smbd: set fsp_flags.is_fsa to true on printer file handles 2024-01-08 15:53:36 +00:00
profile profile: Fix rusage reporting 2023-12-19 16:05:36 +00:00
registry libcli/security: Rename dup_nt_token() -> security_token_duplicate() 2023-09-26 23:45:36 +00:00
rpc_client s3/rpc_client: Fix array offset check 2024-02-17 17:58:43 +00:00
rpc_server s3:rpc_server/witness: add handling of MSG_RPCD_WITNESS_REGISTRATION_UPDATE messages 2024-01-26 17:00:33 +00:00
rpcclient s3:rpcclient: Use dcerpc_lsa_open_policy_fallback() in cmd_lsarpc.c 2023-11-21 11:16:37 +00:00
script selftest: test listing trusted domains that includes an NT4 domain 2024-01-20 13:20:37 +00:00
selftest selftest: test listing trusted domains that includes an NT4 domain 2024-01-20 13:20:37 +00:00
services s3:services: Disable rcinit-based service control code 2021-12-10 14:02:30 +00:00
smbd s3/smbd: If we fail to close file_handle ensure we should reset the fd 2024-03-13 10:34:45 +00:00
torture torture: Fix an error message 2024-03-12 13:31:31 +00:00
utils smbd: Give smbXsrv_session.c its own header file 2024-03-12 13:31:31 +00:00
web
winbindd s3: winbindd: assign rangenum member after NULL check 2024-02-22 10:57:38 +00:00
.clang_complete
.dmallocrc
.indent.pro
Doxyfile
mainpage.dox
smbadduser.in
wscript build: Move --with-ldap/--without-ldap from source3 build to top level 2024-03-01 02:41:36 +00:00
wscript_build VERSION: move COPYRIGHT_STARTUP_MESSAGE as SAMBA_COPYRIGHT_STRING into version.h 2023-12-15 10:44:42 +00:00
wscript_configure_system_ncurses