]> git.neil.brown.name Git - mdadm.git/commit
mdadm/platform-intel: buffer overflow detected
authorXiao Ni <xni@redhat.com>
Tue, 28 May 2024 08:44:39 +0000 (16:44 +0800)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Tue, 28 May 2024 15:06:45 +0000 (17:06 +0200)
commit827e1870f320545796d907f50af594e901399417
treed435153fe66b4cc5b8fb1ab3b9257f9aaf3e8986
parentb914aa25ee1fe3e0bd97f58bdf2bfdd185992a79
mdadm/platform-intel: buffer overflow detected

mdadm -CR /dev/md0 -l1 -n2 /dev/nvme0n1 /dev/nvme2n1
*** buffer overflow detected ***: terminated
Aborted (core dumped)

It doesn't happen 100% and it depends on the building environment.
It can be fixed by replacing sprintf with snprintf.

Fixes: d835518b6b53 ('imsm: nvme multipath support')
Reported-by: Guang Wu <guazhang@redhat.com>
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
platform-intel.c