Parsing issue in mal formatted "mac_address_list"
Reported by @un1c0rn on Discord
I dug into this a bit and I'm very sure this is just bad engineering on the NVIDIA side. When there are lots of network interfaces, the GRID driver sends the licensing server a malformed JSON that looks similar to this:
{"environment":{"fingerprint":{"mac_address_list":[ff:feee:eeee%caliadbe4391968","fe80::ecee:eeff:feee:eeee%cali88663d38b5c","fe80::ecee:eeff:feee:eeee%calic33566e59a9","fe80::ecee:eeff:feee:eeee%cali02eb053f328","fe80::ecee:eeff:feee:eeee%calib9f3e42c09e","fe80::ecee:eeff:feee:eeee%caliae67f159427","fe80::ecee:eeff:feee:eeee%calif76b16eb2c3"]},"ip_address_list":["10.0.1.1","10.0.50.105","10.0.50.174","10.0.70.105","172.20.0.1","172.18.0.1","172.19.0.1","172.28.0.1","172.27.0.1","172.17.0.1","10.1.195.64","2620:101:f000:8202:7461:74ff:fe6f:3039","fe80::e8f1:1cff:fe6f:cb1c%ens19","fe80::d846:e6ff:fe55:c5a6%ztyxa3yby6","fe80::42:8cff:fe79:8b34%docker0","fe80::42:48ff:fe44:9836%br-c13d61150438","fe80::42:68ff:fed2:1ed5%br-d939e6d7eeab","fe80::42:4eff:fe06:2345%br-f1522fc52bc8","fe80::42:8eff:fe22:bb1b%br-143d5f57ebd8","fe80::7c22:3ff:fee5:6e3d%vetheb94fa4","fe80::d0ba:efff:fef6:c027%veth73bd89c","fe80::3880:a0ff:fe1c:5f78%veth4627301","fe80::5cb7:23ff:fe8d:2de0%veth8d236d2","fe80::b861:8bff:fe41:5f96%veth0d3f8a3","fe80::145c:d7ff:fe24:eb2%veth46dcaf3","fe80::ecee:eeff:feee:eeee%calib51b266afa2","fe80::ecee:eeff:feee:eeee%cali7931cb23418","fe80::ecee:eeff:feee:eeee%califa16fe966d1","fe80::ecee:eeff:feee:eeee%calia631f16ea98","fe80::ecee:eeff:feee:eeee%cali120a864896c","fe80::640b:49ff:fe84:d481%vxlan.calico","fe80::ecee:eeff:feee:eeee%caliadbe4391968","fe80::ecee:eeff:feee:eeee%cali88663d38b5c","fe80::ecee:eeff:feee:eeee%calic33566e59a9","fe80::ecee:eeff:feee:eeee%cali02eb053f328","fe80::ecee:eeff:feee:eeee%calib9f3e42c09e","fe80::ecee:eeff:feee:eeee%caliae67f159427","fe80::ecee:eeff:feee:eeee%calif76b16eb2c3"]}
Notice the first item of mac_address_list is missing a few characters in the beginning. In the driver they probably made an assumption that the number of network interfaces is small, so that the space they allocate for the string is sufficiently large.
This causes the licensing server to crash when trying to parse this string. I patched the licensing server to add in the missing quote when detected, but then the client still errors out with Maximum buffer size exceeded after receiving a response from the server.