Following up #6264, it is not clear that the KVS ensures that all data is below the maximum allowed and that errors propogate correctly / consistently. For example:
int flux_kvs_txn_put (flux_kvs_txn_t *txn,
int flags,
const char *key,
const char *value);
internally flux_kvs_txn_put() calls strlen (value) which can return size_t which can be larger than int. It's not super clear what the fallout of such calls could be. That value is passed to treeobj_create_val() (takes an int), which then calls base64_encoded_length () (takes a size_t). I'm not sure what error would result here.
In
int flux_kvs_txn_pack (flux_kvs_txn_t *txn,
int flags,
const char *key,
const char *fmt,
...);
It appears internally the resulting string after json_pack() is called is not checked for length either before being passed to treeobj_create_val().
Also need to audit that large values sent directly to the KVS module outside of the API are rejected accordingly.
Following up #6264, it is not clear that the KVS ensures that all data is below the maximum allowed and that errors propogate correctly / consistently. For example:
internally
flux_kvs_txn_put()
callsstrlen (value)
which can returnsize_t
which can be larger thanint
. It's not super clear what the fallout of such calls could be. That value is passed totreeobj_create_val()
(takes anint
), which then callsbase64_encoded_length ()
(takes asize_t
). I'm not sure what error would result here.In
It appears internally the resulting string after
json_pack()
is called is not checked for length either before being passed totreeobj_create_val()
.Also need to audit that large values sent directly to the KVS module outside of the API are rejected accordingly.