Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #1147 : init frag variable before use. #1149

Closed
wants to merge 2,599 commits into from
Closed

Conversation

vankoven
Copy link
Contributor

No description provided.

krizhanovsky and others added 30 commits July 6, 2018 22:13
However, linux asymmetric and elliptic crypto seems incomplete, so I leave
the old RSA and ECDH for now. Also note that generally speaking cipher.[ch]
and md.[ch] wrappers are for elimination in future - now they just link
bunch of mbedTLS code w/ linux/crypto.
…d even TCP segment;

Multiple handshakes FSM fixes.
Fix #1033: Change header name format in HTTP tables configuration.
 Fix #772: Change 'keepalive' and 'client_body' timeouts applying.
   The page is used later as skb page fragment in TLS handshake.
2. Cleanups in PEM decoder.
3. Remove DHM routines called only for FS IO (unused).
4. Revert DTLS routines (dirty code) as it's supposed to used them for QUIC.
Fix #900: Change some comments and add unit tests.
2. Make GFSM traverse skb list and call a FSM for each skb. TLS layer
   must collect skbs before decryption to have AEAD tag, so it sends
   list of decrypted skbs to HTTP layer by GFSM call. However, HTTP
   manages skb list on it's own.
3. Make ttls_decrypt() to work with plain buffers as well as fragmented
   skbs;
4. Some cleanups.
SIMD crypto algorithms won't be called through cryptd.
Some cleanups.
tfw_gfsm_switch() can be called multiple times during tfw_gfsm_move()
call. After each tfw_gfsm_switch() call current FSM is switched
to FSM stated in fsm_hooks. Thus FSM(st) actually points on
child FSM state, not parent one.
tempesta_fw/msg.c Outdated Show resolved Hide resolved
i-rinat and others added 3 commits January 16, 2019 23:05
Sanitize Content-Type for multipart/form-data requests
* req->vhost is expected to be non-NULL, as it was checked before;
* disallow multiple instances of http_post_validate at topmost level;
* a typo.
Copy link
Contributor

@krizhanovsky krizhanovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and the bug may introduce very nasty crashes and stranges in behaviour, so please merge it ASAP.

Generally agree with @i-rinat on comments except that @frag is checked from NULL at the begin of TFW_STR_FOR_EACH_CHUNK() loop, so it's still needed to initialize frag before first entry to the loop. Also frag assignment in the else branch is required for the check after jumping to this_chunk.

@i-rinat
Copy link
Contributor

i-rinat commented Jan 18, 2019

except that frag is checked from NULL at the begin of TFW_STR_FOR_EACH_CHUNK() loop, so it's still needed to initialize frag before first entry to the loop.

That check looks like a remainder from the older code. The current version tests whenever frag is NULL, but then before it's used, frag is changed again anyway.

i-rinat and others added 5 commits January 18, 2019 22:05
The function receives TfwMsgIter as argumrnt (as the arguments actually),
The 'skb' and 'f' point to specific fragment of the skb. If the condition
is false, then TfwMsgIter->skb and TfwMsgIter->frag may point to
unexisting skb fragment.
@vankoven vankoven force-pushed the ik-fix-uninited-var branch 2 times, most recently from 2121aa5 to f174be8 Compare January 24, 2019 11:32
tempesta_fw/msg.c Outdated Show resolved Hide resolved
Copy link
Contributor

@i-rinat i-rinat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants