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

Update all supported postgresql versions (Fixes CVE-2018-16850) #49906

Merged
merged 6 commits into from Nov 14, 2018

Conversation

lsix
Copy link
Member

@lsix lsix commented Nov 8, 2018

Motivation for this change

There have been a release for all the supported postgresql versions.

See https://www.postgresql.org/about/news/1905/ for release information.

Fixes CVE-2018-16850

Once merged, I’ll port those updates to release-18.03 and release-18.09.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@lsix
Copy link
Member Author

lsix commented Nov 8, 2018

postgresql-10 (and less probable postgresql-11) users using pg_stat_statements will need to run ALTER EXTENSION pg_stat_statements UPDATE;. I am not sure if we have way to notify users about that…

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/2yfsndf94xzw0lw1l9yr0ja48jw2ramk-postgresql-9.6.11-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/w8bcbwcmdnrmg0wg87gnw6rl13qrl76c-postgresql-9.6.11-doc
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/w8bcbwcmdnrmg0wg87gnw6rl13qrl76c-postgresql-9.6.11-doc
checking for references to /build in /nix/store/w8bcbwcmdnrmg0wg87gnw6rl13qrl76c-postgresql-9.6.11-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man
gzipping man pages under /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man/share/man/
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man
checking for references to /build in /nix/store/02vza0iqjysf9kr41wqx0n5dr7ywpa2p-postgresql-9.6.11-man...

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/5lnvs61q66ysq3napnc3sz0lalk4gsll-postgresql-9.6.11-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/xd6f2vazmxfvf9d1cl4fi7d2nsm4hcgb-postgresql-9.6.11-doc
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/xd6f2vazmxfvf9d1cl4fi7d2nsm4hcgb-postgresql-9.6.11-doc
checking for references to /build in /nix/store/xd6f2vazmxfvf9d1cl4fi7d2nsm4hcgb-postgresql-9.6.11-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man
gzipping man pages under /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man/share/man/
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man
checking for references to /build in /nix/store/ivd3cg0i3wc86df9p2j85n8vdir0kcim-postgresql-9.6.11-man...

@thoughtpolice
Copy link
Member

postgresql-10 (and less probable postgresql-11) users using pg_stat_statements will need to run ALTER EXTENSION pg_stat_statements UPDATE;. I am not sure if we have way to notify users about that…

This is really the traditional mechanism for doing upgrades on extensions, but yes, I don't know of any way to force it. I don't even think e.g. Debian/Ubuntu packages will do any forced alterations like this (after all, you could have completely changed the permissions for all connected users, and any automated scripts couldn't know this a priori.)

It might be best just to post an update to Discourse? Or maybe we should have some better news feed for things like this...

@lsix
Copy link
Member Author

lsix commented Nov 8, 2018

Yes, sure, it is quite standard to do on when updating postgresql with extensions.

While reading the update recommendations on the release note, I just told myself that when ported to release-18.09, users might end runing a nixos-rebuild switch --upgrade or equivalent and miss it. But there is nothing new under the sun here, it happened already and will happen again !

This was just a remark, and I’ll probably drop a discourse comment about that.

@c0bw3b
Copy link
Contributor

c0bw3b commented Nov 9, 2018

Maybe this should target staging given the number of rebuilds?
Then it could be merged with other sec-related PRs

@lsix lsix changed the base branch from master to staging November 9, 2018 08:34
@lsix
Copy link
Member Author

lsix commented Nov 9, 2018

@c0bw3b I have just rebased to staging a changed the PR's base.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/7n26qdcrsr58g5yzfkhgnkd3digy4p03-postgresql-9.6.11-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/bhrpin5scc2ky1bmfq6icykg9cxdnmc1-postgresql-9.6.11-doc
strip is /nix/store/xzn29jrdk6czmx5qai15v6hwsrxviw4c-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/bhrpin5scc2ky1bmfq6icykg9cxdnmc1-postgresql-9.6.11-doc
checking for references to /build in /nix/store/bhrpin5scc2ky1bmfq6icykg9cxdnmc1-postgresql-9.6.11-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man
gzipping man pages under /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man/share/man/
strip is /nix/store/xzn29jrdk6czmx5qai15v6hwsrxviw4c-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man
checking for references to /build in /nix/store/bzyw1biggyhndrccrkrxf5bdpcbrln05-postgresql-9.6.11-man...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: postgresql_10, postgresql_11, postgresql_9_3, postgresql_9_4, postgresql_9_5, postgresql_9_6

Partial log (click to expand)

checking for references to /build in /nix/store/lx90m7zlc0gg1nynsb1rb1zyfnb8qcc2-postgresql-10.6-lib...
shrinking RPATHs of ELF executables and libraries in /nix/store/7dgzwl9cv4jc8w0781r7br0g5nqkcbfc-postgresql-10.6-doc
strip is /nix/store/426i2d272x6c8j4shwl1377xj2cf1ijj-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/7dgzwl9cv4jc8w0781r7br0g5nqkcbfc-postgresql-10.6-doc
checking for references to /build in /nix/store/7dgzwl9cv4jc8w0781r7br0g5nqkcbfc-postgresql-10.6-doc...
shrinking RPATHs of ELF executables and libraries in /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man
gzipping man pages under /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man/share/man/
strip is /nix/store/426i2d272x6c8j4shwl1377xj2cf1ijj-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man
checking for references to /build in /nix/store/fi8j9zm11nv9q8cxyqh8q9x24j3gjh9d-postgresql-10.6-man...

@c0bw3b c0bw3b merged commit 8582a82 into NixOS:staging Nov 14, 2018
@lsix lsix deleted the update_postgresql branch August 22, 2019 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants