{"push_id":2201804378,"size":16,"distinct_size":12,"ref":"refs/heads/neels/ctrl_parsing","head":"41dcec816eb56d69dc69120e6bac06365d783a0a","before":"179f3a01446556d0d8eeb816c0c2b68034495180","commits":[{"sha":"62e40855c2b1b50627dba5b187be8869e2cb2054","author":{"name":"Harald Welte","email":"1bea0d4f31c8562ffb1eea349653b7434bf390c6@gnumonks.org"},"message":"gsm0808_create_cipher_reject: Fix encoding of Cause IE\n\nThe Cause IE in the 08.08 CIPHER MODE REJECT is a normal TLV IE,\nand not just a value.  Let's make sure we encode the cause value\nproperly.\n\nChange-Id: I4f5b231edf6dcb0a9c2bbafb2a59f301f3b2402b\nCloses: OS#2766","distinct":false,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/62e40855c2b1b50627dba5b187be8869e2cb2054"},{"sha":"3ef14a241afc123560e9a50d17948b040481b299","author":{"name":"Max","email":"e9c06294d3fc1ade8de1e7f7e3ec58bcf46fd6ad@sysmocom.de"},"message":"Do not allocate already existing counter group\n\nCheck that no group with the given name and index already exist before\nallocating it. Add corresponding test case.\n\nChange-Id: I563764af1d28043e909234ebb048239125ce6ecd\nRelated: OS#2757","distinct":false,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/3ef14a241afc123560e9a50d17948b040481b299"},{"sha":"e5a2bdbc5501b892605a6a1fe7e30fb2f1546d42","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"fix osmo_identifier_valid(): only allow printable characters\n\nIn particular disallow ASCII 0..31 (control characters) and 127 (DEL).\n\nChange-Id: I04469988495af03c881fe81d7786ca7f71636299","distinct":false,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/e5a2bdbc5501b892605a6a1fe7e30fb2f1546d42"},{"sha":"937ddea6cce45f3f6dcb8177ea86162f15ecb5f9","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"utils: add osmo_separated_identifiers_valid()\n\nFor validating CTRL input, we want to verify that an input variable is a series\nof valid osmo_identifier_valid() separated by dots. Allow validating any\nadditional chars with identifiers, for CTRL vars will be just \".\".\n\nChange-Id: I13dfd02c8c870620f937d789873ad84c6b1c45de","distinct":false,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/937ddea6cce45f3f6dcb8177ea86162f15ecb5f9"},{"sha":"5674c182b620bd7cb2c5a175382f8e72cecea1cf","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"utils: add osmo_escape_str()\n\nTo report invalid characters in identifiers, it is desirable to escape any\nweird characters. Otherwise we might print stray newlines or control characters\nin the log output.\n\nctrl_test.c already uses a print_escaped() function, which will be replaced by\nosmo_escape_str() in a subsequent patch.\n\ncontrol_cmd.c will use osmo_escape_str() to log invalid identifiers.\n\nChange-Id: Ic685eb63dead3967d01aaa4f1e9899e5461ca49a","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/5674c182b620bd7cb2c5a175382f8e72cecea1cf"},{"sha":"d8ad45804a605d9c0f22725aecf9a38450a35e31","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl_test.c: replace print_escaped() with new osmo_escape_str()\n\nChange-Id: I12d3828dcc925f97fde11c360f1d60f3bd8cad8b","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/d8ad45804a605d9c0f22725aecf9a38450a35e31"},{"sha":"32c8f8ac9999a0fa0791a7ef1bdd87210876e15f","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl: prep test: separate new ctrl_handle_msg() from handle_control_read()\n\nIn order to allow unit testing the ctrl iface msgb handling, have a separate\nmsgb entry point function from the actual fd read function.\n\nAn upcoming patch will prove a memory leak in CTRL msgb handling by a unit test\nthat needs this separation.\n\nChange-Id: Ie09e39db668b866eeb80399b82e7b04b8f5ad7c3","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/32c8f8ac9999a0fa0791a7ef1bdd87210876e15f"},{"sha":"86f9b1902cb0294a2b3c096dce88a15439d1d661","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl_test: expand to test message handling and detect mem leaks\n\nSubsequent patches that tighten CTRL input validation will make the results\nmore interesting.\n\nChange-Id: Idd4cc7d193db1a7d761f72ed33ed46eea450a78f","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/86f9b1902cb0294a2b3c096dce88a15439d1d661"},{"sha":"3ddb493599b61fcbe7dddb29ab6ed3a13914648c","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl_test: show memleak when receiving GET_REPLY and SET_REPLY commands\n\nThe \"memleak!\" output shows messages that lack a talloc_free() of the parsed\nctrl command buffer. The leak shall be fixed in a subsequent patch.\n\nChange-Id: I2c3e4d08b769b9cd77593362ea36a28d681cd042","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/3ddb493599b61fcbe7dddb29ab6ed3a13914648c"},{"sha":"6115231b49382c6b21677c8ec985f61af93383c3","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl: fix mem leak when handling GET_REPLY and SET_REPLY\n\nIn ctrl_handle_msg() (code recently propagated from handle_control_read()),\ntalloc_free() the parsed ctrl_cmd in all code paths. In particular, a free was\nmissing in case ctrl_cmd_handle() returns CTRL_CMD_HANDLED.\n\nCTRL_CMD_HANDLED is triggered by GET_REPLY / SET_REPLY parsing, as show by\nctrl_test.c. With the memleak fixed, adjust expected test output and make a\ndetected mem leak abort the test immediately.\n\nChange-Id: Id583b413f8b8bd16e5cf92a8a9e8663903646381","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/6115231b49382c6b21677c8ec985f61af93383c3"},{"sha":"41eec760c14a594042daab768e85e4a04d20dfc4","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl_test: add two more current parsing bugs to prep for fix\n\nChange-Id: Id11bc326be2f0bc2746a928354e416495a18baf7","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/41eec760c14a594042daab768e85e4a04d20dfc4"},{"sha":"29ed24daee0351f5bd1947a74d0a7c40fdf96d7f","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"add ctrl_cmd_parse2() to return parsing errors\n\nIf a control command fails to parse, we so far discard specific error messages\nand instead send just \"Command parser error\".\n\nIn ctrl_cmd_parse() we actually compose detailed error replies, but in the end\nsimply talloc_free() them and return NULL.\n\nA first step to report these errors to the ctrl command issuer is to not return\nNULL and instead return the cmd with type = CTRL_TYPE_ERROR. Add\nctrl_cmd_parse2() to return such instead of NULL.\n\nTo stay API compatible, provide ctrl_cmd_parse2() to return a cmd on errors.\nctrl_cmd_parse() retains identical behavior but becomes just a simple wrapper\naround ctrl_cmd_parse2() which discards the cmd on error.\n\nNo need really to deprecate ctrl_cmd_parse() yet; especially as long as\ncompiler warnings might break jenkins builds.\n\nChange-Id: I5047c9f977d70b03eea77cbcfd2b96d43ea46880","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/29ed24daee0351f5bd1947a74d0a7c40fdf96d7f"},{"sha":"c4eaafd6a195491d93161b165ecd7af5456267d5","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl: on parse errors, return a detailed message to sender\n\nThe recently added ctrl_cmd_parse2() returns non-NULL cmd with error messages\nupon parsing errors. In handle_control_read(), use ctrl_cmd_parse2() and send\nthose back to the CTRL command sender as reply.\n\nRetain the previous \"Command parser error\" reply only in case ctrl_cmd_parse2()\nshould return NULL, which shouldn't actually happen at all.\n\nChange-Id: Ie35a02555b76913bb12734a76fc40fde7ffb244d","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/c4eaafd6a195491d93161b165ecd7af5456267d5"},{"sha":"ff1713e115789f1fff7f6fdc7f34b321fab27064","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl: tighten CTRL input parsing\n\nValidate that incoming CTRL commands...\n- have decimal IDs,\n- return error on trailing characters,\n- have invalid characters in variable identifiers,\n- send detailed error messages as reply to the requestor.\n\nAdjust ctrl_test.{c,ok}, which best show the change in behavior.\n\nMessage handling causes log messages on stderr; previously, stderr was empty.\nAdd '[ignore]' in testsuite.at so that the nonempty stderr doesn't cause test\nfailures.\n\nChange-Id: I96a9b6b6a3a5e0b80513aa9eaa727ae8c9c7d7a1","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/ff1713e115789f1fff7f6fdc7f34b321fab27064"},{"sha":"e554429d04bceaac626165d13b69948477482e06","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"ctrl: separate handling of GET_REPLY, SET_REPLY and TRAP\n\nSo far, error reporting just says \"Trap/Reply\", more accurately report 'GET\nREPLY', 'SET REPLY' and 'TRAP' as appropriate.\n\nChange-Id: Ic25a251502499aeda4e2952ec4190a1fa0bebb01","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/e554429d04bceaac626165d13b69948477482e06"},{"sha":"41dcec816eb56d69dc69120e6bac06365d783a0a","author":{"name":"Neels Hofmeyr","email":"4c41c11d7eb50d725a01925bcbe332650aed7419@hofmeyr.de"},"message":"add osmo_auth_c3(): separate from gsm_milenage()\n\nTo send a Ciphering Mode Command, we may need to derive a Kc from UMTS AKA\ntokens. gsm_milenage() derives Kc from 3G tokens, but also derives an SRES.\nFor SRES, it requires an OPC, which may need to be derived from OP first. All\nwe need is a Kc, so we could feed a zero OPC ...  but to simplify the function\ncall for cases where just a Kc is required, separate the c3 function out from\ngsm_milenage(), as osmo_auth_c3(). Obviously call osmo_auth_c3() from\ngsm_milenage() (meaning that osmo-hlr's 55.205 derived auc tests still cover\nexactly that implementation).\n\nPrepares: If04e405426c55a81341747a9b450a69188525d5c (osmo-msc)\nRelated: OS#2745\nChange-Id: I85a1d6ae95ad9e5ce9524ef7fc06414848afc2aa","distinct":true,"url":"https://api.github.com/repos/osmocom/libosmocore/commits/41dcec816eb56d69dc69120e6bac06365d783a0a"}]}
{"actor":{"display_login":"osmocom-gerrit"}}