]> xenbits.xensource.com Git - xen.git/commitdiff
tools/ocaml/xenstored: Synchronise defaults with oxenstore.conf.in
authorEdwin Török <edvin.torok@citrix.com>
Wed, 12 Oct 2022 18:13:01 +0000 (19:13 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 1 Nov 2022 15:25:15 +0000 (15:25 +0000)
We currently have 2 different set of defaults in upstream Xen git tree:
* defined in the source code, only used if there is no config file
* defined in the oxenstored.conf.in upstream Xen

An oxenstored.conf file is not mandatory, and if missing, maxrequests in
particular has an unsafe default.

Resync the defaults from oxenstored.conf.in into the source code.

This is part of XSA-326 / CVE-2022-42316.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
(cherry picked from commit 84734955d4bf629ba459a74773afcde50a52236f)

tools/ocaml/xenstored/define.ml
tools/ocaml/xenstored/quota.ml

index f574397a4c0b3ca867609e9b7b0ef09abc5494bc..96c125a969da512652074f9aa395264567d93277 100644 (file)
@@ -22,9 +22,9 @@ let xs_daemon_socket_ro = Paths.xen_run_stored ^ "/socket_ro"
 
 let default_config_dir = Paths.xen_config_dir
 
-let maxwatch = ref (50)
-let maxtransaction = ref (20)
-let maxrequests = ref (-1)   (* maximum requests per transaction *)
+let maxwatch = ref (100)
+let maxtransaction = ref (10)
+let maxrequests = ref (1024)   (* maximum requests per transaction *)
 
 let conflict_burst_limit = ref 5.0
 let conflict_max_history_seconds = ref 0.05
index abcac912805ada3a51315431c82bb56c83dd4c4d..6e3d6401ae895e79a6d21172bf42c488056f76d3 100644 (file)
@@ -20,8 +20,8 @@ exception Transaction_opened
 
 let warn fmt = Logging.warn "quota" fmt
 let activate = ref true
-let maxent = ref (10000)
-let maxsize = ref (4096)
+let maxent = ref (1000)
+let maxsize = ref (2048)
 
 type t = {
        maxent: int;               (* max entities per domU *)