Red Hat internal coverity reports: source3/winbindd/winbindd_cm.c:1747: closed_arg: "cm_prepare_connection(struct winbindd_domain *, int const, char const *, struct cli_state **, _Bool *)" closes "fd". source3/winbindd/winbindd_cm.c:1752: double_close: Calling "close(int)" closes handle "fd" which has already been closed. # 1750| break; # 1751| } # 1752|-> close(fd); # 1753| fd = -1; # 1754| if (!retry) { ==== Fix will follow.
This bug was referenced in samba master: dd998cc163358edd6c748e40900247877f91eb1f
Created attachment 17999 [details] 4.18 patch
Comment on attachment 17999 [details] 4.18 patch Misses cherry-picked tag...
Created attachment 18000 [details] 4.18 patch with cherry-pick tag
Is this bug only present in 4.18, or does is also apply to 4.17?
The bug (double close) is present also in 4.17. Samba 4.17 has one extra issue with not calling close in cm_open_connection() at line 1710: https://gitlab.com/samba-team/samba/-/blob/v4-17-test/source3/winbindd/winbindd_cm.c?ref_type=heads#L1710 Do we want to fix 4.17? Cherry pick is not possible, but the manual fix is not difficult for both issues.
You decide. :) I'm ok with keeping it unfixed in 4.17.
Backporting to 4.18 is enough for me.
Reassigning to Jule for inclusion in 4.18.
This bug was referenced in samba v4-19-test: dd998cc163358edd6c748e40900247877f91eb1f
This bug was referenced in samba v4-19-stable (Release samba-4.19.0rc1): dd998cc163358edd6c748e40900247877f91eb1f
Pushed to autobuild-v4-18-test.
This bug was referenced in samba v4-18-test: c1c2a0ec80d65e663f4cd6ed144f77b75d0edea7
Closing out bug report. Thanks!
This bug was referenced in samba v4-18-stable (Release samba-4.18.6): c1c2a0ec80d65e663f4cd6ed144f77b75d0edea7