mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 09:14:59 +02:00
- djm@cvs.openbsd.org 2014/02/26 20:29:29
[channels.c] don't assume that the socks4 username is \0 terminated; spotted by Ben Hawkes; ok markus@
This commit is contained in:
parent
e6a74aeeac
commit
1348129a34
@ -9,6 +9,10 @@
|
|||||||
bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
|
bz#2107 - cache OIDs of supported GSSAPI mechanisms before privsep
|
||||||
sandboxing, as running this code in the sandbox can cause violations;
|
sandboxing, as running this code in the sandbox can cause violations;
|
||||||
ok markus@
|
ok markus@
|
||||||
|
- djm@cvs.openbsd.org 2014/02/26 20:29:29
|
||||||
|
[channels.c]
|
||||||
|
don't assume that the socks4 username is \0 terminated;
|
||||||
|
spotted by Ben Hawkes; ok markus@
|
||||||
|
|
||||||
20140224
|
20140224
|
||||||
- OpenBSD CVS Sync
|
- OpenBSD CVS Sync
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: channels.c,v 1.330 2014/02/15 23:05:36 djm Exp $ */
|
/* $OpenBSD: channels.c,v 1.331 2014/02/26 20:29:29 djm Exp $ */
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
||||||
@ -1072,6 +1072,9 @@ channel_decode_socks4(Channel *c, fd_set *readset, fd_set *writeset)
|
|||||||
buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);
|
buffer_get(&c->input, (char *)&s4_req.dest_addr, 4);
|
||||||
have = buffer_len(&c->input);
|
have = buffer_len(&c->input);
|
||||||
p = buffer_ptr(&c->input);
|
p = buffer_ptr(&c->input);
|
||||||
|
if (memchr(p, '\0', have) == NULL)
|
||||||
|
fatal("channel %d: decode socks4: user not nul terminated",
|
||||||
|
c->self);
|
||||||
len = strlen(p);
|
len = strlen(p);
|
||||||
debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
|
debug2("channel %d: decode socks4: user %s/%d", c->self, p, len);
|
||||||
len++; /* trailing '\0' */
|
len++; /* trailing '\0' */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user