[lxc/lxc] d8f2c5: cmd/lxc-user-nic: prevent OOB read in name_is_in_g...

0 views
Skip to first unread message

Christian Brauner

unread,
Feb 26, 2026, 8:44:34 AMFeb 26
to lxc-...@lists.linuxcontainers.org
Branch: refs/heads/main
Home: https://github.com/lxc/lxc
Commit: d8f2c55fae394d6f0cd38a9ed3d648448f59199e
https://github.com/lxc/lxc/commit/d8f2c55fae394d6f0cd38a9ed3d648448f59199e
Author: Alexander Mikhalitsyn <aleksandr....@futurfusion.io>
Date: 2026-02-26 (Thu, 26 Feb 2026)

Changed paths:
M src/lxc/cmd/lxc_user_nic.c

Log Message:
-----------
cmd/lxc-user-nic: prevent OOB read in name_is_in_groupnames

We need to be more careful when iterating an array of strings
in name_is_in_groupnames. First of all, groupnames can be NULL
(this was checked), but then, we need to check for *groupnames
instead of groupnames in while-condition.

Bug was here since lxc-2.0.0.

Fixes: af59ff2eede7 ("Changed parsing of allotments. Now parses top-to-bottom regardless of user or group")
Signed-off-by: Alexander Mikhalitsyn <aleksandr....@futurfusion.io>


Commit: 71712b1f9fd8e6d785bf412dad7bc8d1c4f7af80
https://github.com/lxc/lxc/commit/71712b1f9fd8e6d785bf412dad7bc8d1c4f7af80
Author: Christian Brauner <chri...@amutable.com>
Date: 2026-02-26 (Thu, 26 Feb 2026)

Changed paths:
M src/lxc/cmd/lxc_user_nic.c

Log Message:
-----------
Merge pull request #4651 from mihalicyn/lxc_user_nic_fixes

cmd/lxc-user-nic: prevent OOB read in name_is_in_groupnames


Compare: https://github.com/lxc/lxc/compare/0d808463a76a...71712b1f9fd8

To unsubscribe from these emails, change your notification settings at https://github.com/lxc/lxc/settings/notifications
Reply all
Reply to author
Forward
0 new messages