CVE-2023-34968: mdssvc: introduce an allocating wrapper to sl_pack()