Projects
Mega:23.09
bind
_service:tar_scm:bind-9.11-rh1666814.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:bind-9.11-rh1666814.patch of Package bind
From d05d116da39c0a5c580ceaac6ba069899b82c5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> Date: Wed, 16 Jan 2019 16:27:33 +0100 Subject: [PATCH] Fix possible crash when loading corrupted file Some values passes internal triggers by coincidence. Fix the check and check also first_node_offset before even passing it further. --- lib/dns/rbt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c index 5aee5f6..7f2c2d2 100644 --- a/lib/dns/rbt.c +++ b/lib/dns/rbt.c @@ -945,7 +945,9 @@ dns_rbt_deserialize_tree(void *base_address, size_t filesize, rbt->root = (dns_rbtnode_t *)((char *)base_address + header_offset + header->first_node_offset); - if ((header->nodecount * sizeof(dns_rbtnode_t)) > filesize) { + if ((header->nodecount * sizeof(dns_rbtnode_t)) > filesize + || header->first_node_offset > filesize) { + result = ISC_R_INVALIDFILE; goto cleanup; } -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2