Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
openssh.6113
openssh-7.2p2-audit_fixes.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openssh-7.2p2-audit_fixes.patch of Package openssh.6113
# HG changeset patch # Parent fdc9167221e501a9f4db5343cf8cadc31e13fd56 Various auditing fixes to be merged into the RH-originated patch. diff --git a/openssh-7.2p2/packet.c b/openssh-7.2p2/packet.c --- a/openssh-7.2p2/packet.c +++ b/openssh-7.2p2/packet.c @@ -371,20 +371,26 @@ ssh_packet_start_discard(struct ssh *ssh return 0; } /* Returns 1 if remote host is connected via socket, 0 if not. */ int ssh_packet_connection_is_on_socket(struct ssh *ssh) { - struct session_state *state = ssh->state; + struct session_state *state; struct sockaddr_storage from, to; socklen_t fromlen, tolen; + /* auditing might get here without valid connection structure when + * destroying sensitive data on exit and thus aborting disgracefully */ + if ((!ssh) || (!(ssh->state))) + return 0; + state = ssh->state; + /* filedescriptors in and out are the same, so it's a socket */ if (state->connection_in == state->connection_out) return 1; fromlen = sizeof(from); memset(&from, 0, sizeof(from)); if (getpeername(state->connection_in, (struct sockaddr *)&from, &fromlen) < 0) return 0;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor