Commit b4bb304
Update libmaxminddb and test the extension rejects the DoS fixtures
The existing resource-limit tests force the pure Python modes, so they
cover only the pure Python decoder. The C extension decodes through the
vendored libmaxminddb, and nothing asserted that path rejects the DoS
fixtures.
Move the libmaxminddb submodule to the main-branch commit that adds the
decoder resource limits (maxmind/libmaxminddb#479), ahead of the 1.14.0
release. Add extension-path checks that decode each DoS fixture through
MODE_MMAP_EXT and assert an InvalidDatabaseError, and check that the
amplified metadata fixture is rejected when the database is opened. The
checks first probe a fixture one byte over the 2 MiB payload limit, which
is small and safe to decode. The bundled library must reject it with the
decoder-limit message. A system library selected with
MAXMINDDB_USE_SYSTEM_LIBMAXMINDDB may predate the limits and decode it;
the checks then skip rather than run the large DoS fixtures through a
decoder that would exhaust memory.
See GHSA-hj94-g986-h9r7.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>1 parent 7367b20 commit b4bb304
3 files changed
Lines changed: 115 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
Submodule libmaxminddb updated 41 files
- .github/dependabot.yml+14-1
- .github/workflows/clang-addresssanitizer.yml+1-1
- .github/workflows/clang-analyzer.yml+1-1
- .github/workflows/codeql-analysis.yml+3-3
- .github/workflows/dependabot-failure-watcher.yml+123
- .github/workflows/links.yml+32
- .github/workflows/pages.yml+54
- .github/workflows/precious.yml+2-2
- .github/workflows/test.yml+2-2
- .github/workflows/zizmor.yml+2-2
- .gitignore+3-1
- .gitmodules-3
- Changes.md+36
- README.dev.md+3-2
- README.fuzzing.md+1-1
- README.md+3-3
- dev-bin/release.sh-43
- doc/libmaxminddb.md+44-3
- docs/assets/css/main.css+189
- docs/hugo.toml+18
- docs/layouts/404.html+24
- docs/layouts/_default/_markup/render-heading.html+4
- docs/layouts/_default/default.html+27
- include/maxminddb.h+2
- lychee.toml+60
- mise.lock+135-19
- mise.toml+14
- src/data-pool.c+28-12
- src/data-pool.h+11-7
- src/maxminddb.c+179-33
- t/CMakeLists.txt+3
- t/Makefile.am+7-4
- t/bad_search_tree_t.c+55
- t/data-pool-t.c+56-10
- t/decoder_limits_t.pl+266
- t/fuzz_mmdb.c+41-15
- t/invalid_sockaddr_t.c+51
- t/max_depth_t.c+5-5
- t/maxmind-db+1-1
- t/metadata_marker_t.c+23
- t/pointer_dos_t.c+238
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
642 | 648 | | |
643 | 649 | | |
644 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
0 commit comments