Bugzilla – Attachment 2779 Details for
Bug 2521
subtract buffer size from computed rekey limit to avoid exceeding it
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Account for actual contents of buffers when calculating rekeying
rekey-buffer.patch (text/plain), 1.15 KB, created by
Darren Tucker
on 2016-01-08 13:33:03 AEDT
(
hide
)
Description:
Account for actual contents of buffers when calculating rekeying
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2016-01-08 13:33:03 AEDT
Size:
1.15 KB
patch
obsolete
>Index: packet.c >=================================================================== >RCS file: /cvs/src/usr.bin/ssh/packet.c,v >retrieving revision 1.221 >diff -u -p -r1.221 packet.c >--- packet.c 11 Dec 2015 04:21:12 -0000 1.221 >+++ packet.c 8 Jan 2016 02:24:25 -0000 >@@ -2237,16 +2237,21 @@ int > ssh_packet_need_rekeying(struct ssh *ssh) > { > struct session_state *state = ssh->state; >+ u_int32_t buf_in, buf_out; > > if (ssh->compat & SSH_BUG_NOREKEY) > return 0; >+ buf_in = roundup(sshbuf_len(state->input), >+ state->newkeys[MODE_IN]->enc.block_size); >+ buf_out = roundup(sshbuf_len(state->output), >+ state->newkeys[MODE_OUT]->enc.block_size); > return > (state->p_send.packets > MAX_PACKETS) || > (state->p_read.packets > MAX_PACKETS) || > (state->max_blocks_out && >- (state->p_send.blocks > state->max_blocks_out)) || >+ (state->p_send.blocks + buf_out > state->max_blocks_out)) || > (state->max_blocks_in && >- (state->p_read.blocks > state->max_blocks_in)) || >+ (state->p_read.blocks + buf_in > state->max_blocks_in)) || > (state->rekey_interval != 0 && state->rekey_time + > state->rekey_interval <= monotime()); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
djm
:
ok+
dtucker
:
ok-
Actions:
View
|
Diff
Attachments on
bug 2521
:
2778
|
2779
|
2780
|
2783