• Beniamino Galvani's avatar
    libnm-core: fix invalid memory access · 3fa39f61
    Beniamino Galvani authored
    When we delete the runner.name property, the runner object itself gets
    deleted if that was the only property, and @runner becomes invalid.
    
     ==13818== Invalid read of size 1
     ==13818==    at 0x55EAF4: nm_streq (nm-macros-internal.h:869)
     ==13818==    by 0x55EAF4: _json_team_normalize_defaults (nm-utils.c:5573)
     ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
     ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
     ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
     ==13818==  Address 0x182a9330 is 0 bytes inside a block of size 13 free'd
     ==13818==    at 0x4839A0C: free (vg_replace_malloc.c:530)
     ==13818==    by 0x4857868: json_delete_string (value.c:763)
     ==13818==    by 0x4857868: json_delete (value.c:975)
     ==13818==    by 0x4851FA1: UnknownInlinedFun (jansson.h:129)
     ==13818==    by 0x4851FA1: hashtable_do_del (hashtable.c:131)
     ==13818==    by 0x4851FA1: hashtable_del (hashtable.c:289)
     ==13818==    by 0x55DFDD: _json_del_object (nm-utils.c:5384)
     ==13818==    by 0x55EA70: _json_delete_object_on_string_match (nm-utils.c:5532)
     ==13818==    by 0x55EADB: _json_team_normalize_defaults (nm-utils.c:5549)
     ==13818==    by 0x566C89: _nm_utils_team_config_set (nm-utils.c:6057)
     ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
     ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
     ==13818==  Block was alloc'd at
     ==13818==    at 0x483880B: malloc (vg_replace_malloc.c:299)
     ==13818==    by 0x4852E8C: lex_scan_string (load.c:389)
     ==13818==    by 0x4852E8C: lex_scan (load.c:620)
     ==13818==    by 0x4853458: parse_object (load.c:738)
     ==13818==    by 0x4853458: parse_value (load.c:862)
     ==13818==    by 0x4853466: parse_object (load.c:739)
     ==13818==    by 0x4853466: parse_value (load.c:862)
     ==13818==    by 0x4853655: parse_json.constprop.7 (load.c:899)
     ==13818==    by 0x48537CF: json_loads (load.c:959)
     ==13818==    by 0x566780: _nm_utils_team_config_set (nm-utils.c:5961)
     ==13818==    by 0x5498A6: _nm_utils_json_append_gvalue (nm-utils-private.h:228)
     ==13818==    by 0x5498A6: set_property (nm-setting-team.c:1622)
    
    Fixes: a5642fd9 ('libnm-core: team: rework defaults management on runner properties')
    (cherry picked from commit 80a3031a)
    3fa39f61
Name
Last commit
Last update
..
tests Loading commit data...
meson.build Loading commit data...
nm-connection-private.h Loading commit data...
nm-connection.c Loading commit data...
nm-connection.h Loading commit data...
nm-core-enum-types.c.template Loading commit data...
nm-core-enum-types.h.template Loading commit data...
nm-core-internal.h Loading commit data...
nm-core-types-internal.h Loading commit data...
nm-core-types.h Loading commit data...
nm-crypto-gnutls.c Loading commit data...
nm-crypto-impl.h Loading commit data...
nm-crypto-nss.c Loading commit data...
nm-crypto.c Loading commit data...
nm-crypto.h Loading commit data...
nm-dbus-interface.h Loading commit data...
nm-dbus-utils.c Loading commit data...
nm-errors.c Loading commit data...
nm-errors.h Loading commit data...
nm-json.c Loading commit data...
nm-json.h Loading commit data...
nm-keyfile-internal.h Loading commit data...
nm-keyfile-utils.c Loading commit data...
nm-keyfile-utils.h Loading commit data...
nm-keyfile.c Loading commit data...
nm-property-compare.c Loading commit data...
nm-property-compare.h Loading commit data...
nm-setting-6lowpan.c Loading commit data...
nm-setting-6lowpan.h Loading commit data...
nm-setting-8021x.c Loading commit data...
nm-setting-8021x.h Loading commit data...
nm-setting-adsl.c Loading commit data...
nm-setting-adsl.h Loading commit data...
nm-setting-bluetooth.c Loading commit data...
nm-setting-bluetooth.h Loading commit data...
nm-setting-bond.c Loading commit data...
nm-setting-bond.h Loading commit data...
nm-setting-bridge-port.c Loading commit data...
nm-setting-bridge-port.h Loading commit data...
nm-setting-bridge.c Loading commit data...
nm-setting-bridge.h Loading commit data...
nm-setting-cdma.c Loading commit data...
nm-setting-cdma.h Loading commit data...
nm-setting-connection.c Loading commit data...
nm-setting-connection.h Loading commit data...
nm-setting-dcb.c Loading commit data...
nm-setting-dcb.h Loading commit data...
nm-setting-dummy.c Loading commit data...
nm-setting-dummy.h Loading commit data...
nm-setting-ethtool.c Loading commit data...
nm-setting-ethtool.h Loading commit data...
nm-setting-generic.c Loading commit data...
nm-setting-generic.h Loading commit data...
nm-setting-gsm.c Loading commit data...
nm-setting-gsm.h Loading commit data...
nm-setting-infiniband.c Loading commit data...
nm-setting-infiniband.h Loading commit data...
nm-setting-ip-config.c Loading commit data...
nm-setting-ip-config.h Loading commit data...
nm-setting-ip-tunnel.c Loading commit data...
nm-setting-ip-tunnel.h Loading commit data...
nm-setting-ip4-config.c Loading commit data...
nm-setting-ip4-config.h Loading commit data...
nm-setting-ip6-config.c Loading commit data...
nm-setting-ip6-config.h Loading commit data...
nm-setting-macsec.c Loading commit data...
nm-setting-macsec.h Loading commit data...
nm-setting-macvlan.c Loading commit data...
nm-setting-macvlan.h Loading commit data...
nm-setting-match.c Loading commit data...
nm-setting-match.h Loading commit data...
nm-setting-olpc-mesh.c Loading commit data...
nm-setting-olpc-mesh.h Loading commit data...
nm-setting-ovs-bridge.c Loading commit data...
nm-setting-ovs-bridge.h Loading commit data...
nm-setting-ovs-interface.c Loading commit data...
nm-setting-ovs-interface.h Loading commit data...
nm-setting-ovs-patch.c Loading commit data...
nm-setting-ovs-patch.h Loading commit data...
nm-setting-ovs-port.c Loading commit data...
nm-setting-ovs-port.h Loading commit data...
nm-setting-ppp.c Loading commit data...
nm-setting-ppp.h Loading commit data...
nm-setting-pppoe.c Loading commit data...
nm-setting-pppoe.h Loading commit data...
nm-setting-private.h Loading commit data...
nm-setting-proxy.c Loading commit data...
nm-setting-proxy.h Loading commit data...
nm-setting-serial.c Loading commit data...
nm-setting-serial.h Loading commit data...
nm-setting-sriov.c Loading commit data...
nm-setting-sriov.h Loading commit data...
nm-setting-tc-config.c Loading commit data...
nm-setting-tc-config.h Loading commit data...
nm-setting-team-port.c Loading commit data...
nm-setting-team-port.h Loading commit data...
nm-setting-team.c Loading commit data...
nm-setting-team.h Loading commit data...
nm-setting-tun.c Loading commit data...
nm-setting-tun.h Loading commit data...
nm-setting-user.c Loading commit data...
nm-setting-user.h Loading commit data...
nm-setting-vlan.c Loading commit data...
nm-setting-vlan.h Loading commit data...
nm-setting-vpn.c Loading commit data...
nm-setting-vpn.h Loading commit data...
nm-setting-vxlan.c Loading commit data...
nm-setting-vxlan.h Loading commit data...
nm-setting-wifi-p2p.c Loading commit data...
nm-setting-wifi-p2p.h Loading commit data...
nm-setting-wimax.c Loading commit data...
nm-setting-wimax.h Loading commit data...
nm-setting-wired.c Loading commit data...
nm-setting-wired.h Loading commit data...
nm-setting-wireguard.c Loading commit data...
nm-setting-wireguard.h Loading commit data...
nm-setting-wireless-security.c Loading commit data...
nm-setting-wireless-security.h Loading commit data...
nm-setting-wireless.c Loading commit data...
nm-setting-wireless.h Loading commit data...
nm-setting-wpan.c Loading commit data...
nm-setting-wpan.h Loading commit data...
nm-setting.c Loading commit data...
nm-setting.h Loading commit data...
nm-simple-connection.c Loading commit data...
nm-simple-connection.h Loading commit data...
nm-utils-private.h Loading commit data...
nm-utils.c Loading commit data...
nm-utils.h Loading commit data...
nm-version.h Loading commit data...
nm-vpn-dbus-interface.h Loading commit data...
nm-vpn-editor-plugin.c Loading commit data...
nm-vpn-editor-plugin.h Loading commit data...
nm-vpn-plugin-info.c Loading commit data...
nm-vpn-plugin-info.h Loading commit data...