Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a9cdeeda880a56de6dad10b24b3bfa45e2cccb5d
Choose a base ref
...
head repository: nodejs/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 87aa3f1add031361a7bf86a3044c22a66d8cc47e
Choose a head ref
  • 2 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 26, 2021

  1. http2: fix setting options before handle exists

    Currently, when a JS Http2Session object is created, we have
    to handle the situation in which the native object corresponding
    to it does not yet exist. As part of that, we create a typed array
    for storing options that are passed through the `AliasedStruct`
    mechanism, and up until now, we copied that typed array over
    the native one once the native one was available.
    
    This was not good, because it was overwriting the defaults that
    were set during construction of the native typed array with zeroes.
    
    In order to fix this, create a wrapper for the JS-created typed array
    that keeps track of which fields were changed, which enables us to
    only overwrite fields that were intentionally changed on the JS side.
    
    It is surprising that this behavior was not tested (which is,
    guessing from the commit history around these features, my fault).
    The subseqeuent commit introduces a test that would fail without
    this change.
    
    PR-URL: #37875
    Fixes: #37849
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    addaleax committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    0671309 View commit details
    Browse the repository at this point in the history
  2. http2: treat non-EOF empty frames like other invalid frames

    Use the existing mechanism that we have to keep track of invalid frames
    for treating this specific kind of invalid frame.
    
    The commit that originally introduced this check was 695e38b,
    which was supposed to proected against CVE-2019-9518, which in turn
    was specifically about a *flood* of empty data frames. While these are
    still invalid frames either way, it makes sense to be forgiving here
    and just treat them like other invalid frames, i.e. to allow a small
    (configurable) number of them.
    
    Fixes: #37849
    
    PR-URL: #37875
    Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    addaleax committed Mar 26, 2021
    Configuration menu
    Copy the full SHA
    87aa3f1 View commit details
    Browse the repository at this point in the history
Loading