CVE-2026-139196: ceph: don't keep a mon_addr string that failed to parse
In the Linux kernel, the following vulnerability has been resolved:
ceph: don't keep a monaddr string that failed to parse
cephparsemonaddr() stores the string in fsopt->monaddr before handing it to cephparsemonips(), and then returns that function's error. So after a monaddr= that does not parse, fsconfig() reports the failure but the mount context keeps the rejected string.
That matters because cephgettree() uses fsopt->monaddr as the "monitor addresses were supplied" test:
if (fsopt->newdevsyntax && !fsopt->monaddr) return invalfc(fc, "No monitor address");
Userspace is free to ignore the error from fsconfig(FSCONFIGSETSTRING) and go straight to FSCONFIGCMDCREATE. The check then passes on a value that was rejected, and the mount continues with cephoptions::nummon still 0 - which is how syzbot reached the BUGON() in picknewmon() fixed by the previous patch.
Parse first and commit only on success. A failed monaddr= now leaves any previously accepted value in place instead of replacing it with one that does not parse.