8000 Comparing v1.5...v1.5.1 · sraoss/pg_ivm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Permal 10000 ink

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: sraoss/pg_ivm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.5
Choose a base ref
...
head repository: sraoss/pg_ivm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.5.1
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Mar 2, 2023

  1. Fix row level security checks during view maintenance

    The view maintenance is performed under the view owner privilege.
    If a modified table has a RLS policy, the policy must be applied
    to relation for the pre-update-state table and the delta table
    that contained inserted or deleted tuples. Previously, the security
    quals were set to each ENR in a subquery that represents such
    relation. However, the security check on the delta table was not
    properly handled, and this caused that rows that must not be
    accessed from the view owner could appear in the view contents
    when the view was refreshed incrementally during a query containing
    multiple types of commands, like a modifying CTE that contains
    INSERT and UPDATE, or a MERGE command.
    
    This patch fixes it by setting RLS policy to a subquery that
    presents the pre-update-state table and the delta able instead of
    to each RLS. Also, this change makes the code more simple and easy
    to maintain.
    
    CVE-2023-22847
    yugo-n committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    99a176a View commit details
    Browse the repository at this point in the history
  2. Fix to use qualified function names during maintenance

    Previously, functions names in pg_catalog schema that were used during
    view maintenance were not qualified. This is problematic because
    functions in other schema could be referenced unintentionally. Moreover,
    that could result in privilege escalation that if a nefarious user who
    can create a function, arbitrary functions could be executed under IMMV
    owner's privilege.
    
    CVE-2023-23554
    yugo-n committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    14bb84c View commit details
    Browse the repository at this point in the history
  3. Rebuild the query for recalculating min/max after search_path change

    Cached plans for recalculating min/max values are built using
    pg_ivm_get_viewdef() that returns the view definition query text.
    Therefore, if the search_path is changed, the query text is analyzed
    again by SPI, and tables or functions in a wrong schema could be
    referenced in the plan.
    
    To fix this, we check whether the search_path is still the same
    as when we made the cached plan and, if it isn't, we rebuild the
    query text.
    
    CVE-2023-23554
    yugo-n committed Mar 2, 2023
    Configuration menu
    Copy the full SHA
    aaaa6cf View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a81c657 View commit details
    Browse the repository at this point in the history
Loading
0