php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73819 call ssh2_shell() causes segment fault
Submitted: 2016-12-27 03:41 UTC Modified: -
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: salojc2006 at gmail dot com Assigned:
Status: Open Package: ssh2 (PECL)
PHP Version: 7.0.14 OS: ubuntu 16.04 lts
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-12-27 03:41 UTC] salojc2006 at gmail dot com
Description:
------------
calling to ssh2_shell() causes a segment fault.

Test script:
---------------
#!/usr/bin/php
<?php

if (!$ssh = ssh2_connect('host', 22)) {
	die('Error trying connect to ssh host');
};

if (!ssh2_auth_password($ssh, 'username', 'thepass')) {
	die('Authentication by userpass failed');
}

if (!$shell = ssh2_shell($ssh, 'vanilla',array(),80, 25,SSH2_TERM_UNIT_CHARS)) {
	die('Interactive shell failed');
}


Expected result:
----------------
with previous versions I got an interactive stream from ssh2_shell()

Actual result:
--------------
segment fault.

Patches

kdxrrcqg (last revision 2017-01-16 16:07 UTC by sample at email dot tst)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-02-06 07:07 UTC] mhagstrand at gmail dot com
I have put in a PR to fix this issue:

https://github.com/php/pecl-networking-ssh2/pull/24
 [2017-05-23 18:24 UTC] ex at laodc dot com
Can this be pushed upstream? The PR has been accepted, but no new version has been built yet.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Aug 20 11:01:28 2019 UTC