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: 2021-01-14 13:11 UTC
Votes:3
Avg. Score:3.7 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: salojc2006 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: ssh2 (PECL)
PHP Version: 7.0.14 OS: ubuntu 16.04 lts
Private report: No CVE-ID: None
 [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)

Pull Requests

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.
 [2021-01-14 13:11 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-01-14 13:11 UTC] cmb@php.net
The fix is available as of ssh2 1.1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 11 08:01:29 2024 UTC