canonical / canonical/multipass

SSHFS process channel leaks

Open
#4,952 0 comments 0 reactions 1 assignee Claimed by @ricab View on GitHub
jira
Dominant language
C++
Stars
9.2k
Forks
828
Avg merge
3d 1h
Merged PRs (30d)
44

Description

**Describe the bug**
The SFTP session releases the ssh_channel on the SSHFS process, but it never frees it. Ownership is transferred but not properly adopted. Libssh's `sftp_server_new` doesn't transfer ownership and `sftp_server_free` does not free the channel.

https://github.com/canonical/multipass/blob/f4542c359969da40ec92dadb4a2592eea2f38337/src/sshfs_mount/sftp_server.cpp#L313
https://github.com/canonical/multipass/blob/f4542c359969da40ec92dadb4a2592eea2f38337/src/sshfs_mount/sftp_server.cpp#L65-L66

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.