|  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
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: salojc2006 at gmail dot com
New email:
PHP Version: OS:


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

Test script:

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.


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

Add a Patch

Pull Requests

Add a Pull Request


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