Skip to content

snmp SEGV #17330

Closed
Closed

Description

@YuanchengJiang

Description

The following code:

<?php
$session = new SNMP(SNMP::VERSION_2c, $hostname, 'timeout_community_432', $timeout, $retries);
$session->close();
$session->setSecurity('authPriv', 'MD5', $auth_pass, 'AES', $priv_pass);

Resulted in this output:

/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/snmp/snmp.c:952:6: runtime error: member access within null pointer of type 'struct snmp_session'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/snmp/snmp.c:952:6

PHP Version

nightly

Operating System

No response

Activity

  1. self-assigned this
    on Jan 3, 2025
  2. devnexen commented on Jan 3, 2025

    @devnexen
    Member

    I ll have a look later today. Making a fetch object check for accessors seems appropriate.

  3. added 2 commits that reference this issue on Jan 5, 2025
    ca8a497
    cd44814
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions