fix(smb): use the cloudsoda go-smb2 fork

hirochachacha/go-smb2 has no fix for GO-2026-5051, an out-of-bounds read in ReadDir that govulncheck reports as called from walkPath. The cloudsoda fork carries the fix. Dialer.DialConn replaces Dial.
This commit is contained in:
2026-10-02 13:24:13 +01:00
parent 8112b4859f
commit 1ebb4cfd95
3 changed files with 71 additions and 9 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import (
"strings"
"time"
"github.com/hirochachacha/go-smb2"
"github.com/cloudsoda/go-smb2"
"github.com/lukaszraczylo/gohoarder/pkg/errors"
"github.com/lukaszraczylo/gohoarder/pkg/storage"
"github.com/rs/zerolog/log"
@@ -114,7 +114,7 @@ func (s *SMBStorage) createConnection() (*smbConnection, error) {
}
// Establish SMB session
session, err := d.Dial(conn)
session, err := d.DialConn(context.Background(), conn, addr)
if err != nil {
_ = conn.Close()
return nil, fmt.Errorf("failed to establish SMB session: %w", err)