[General Questions and Answers] kariumi:
If I'd prefer not to purchase a new phone, is there much risk a rootkit is installed? Or, is this certainly random device corruption that doesn't seem to be harming anything?

Is there anything I can do to fix the problem? (Yes, I could turn dm-verity off through adb, but that hides the error without fixing it.)

TL;DR

I have an Asus Zenfone V Verizon edition, which is the V520KL A006.

When I was using my phone a few days ago, it suddenly rebooted and since then shows:

Fastboot shows:

After a few days, I finally tried the power button, and it boots up just fine, and seems perfectly stable. I performed complete backups, and for what it's worth, I ran a bunch of droid virus/malware/rootkit scanners, and they found nothing. (Obviously, a good rootkit will hide itself.)

I eventually did a factory reset. This went well, but the red error message remains. So, I believe the corruption must be in a partition that a reset doesn't replace.

MORE DETAILS

I've never unlocked, rooted, or installed a custom ROM onto this phone. The only "beyond typical user" thing I'd previously done is to install adb sourced directly from Google, to be able to run Genymobile's scrcpy, which is an extremely fast open source program that allows me to remotely control my phone from my linux PC, via USB or wireless. I've been using this for many months without any issues.

This appears to mean dm-verity is detecting corruption, and is the "red" version of it which many have described as the death of their device. I believe this means the phone is able to verify the signature on the bootloader and it's able to verify the signature on the kernel, but that the kernel is finding an invalid block(s) on one of the many partitions being read right at turning on (detected because the hash for the block is not as expected.) When this happens, an I/O error is given indicating the block cannot be read.

I have been quite concerned if this might indicate a rootkit had been installed. I haven't done anything that I would suspect could let one in. After spending a lot of time learning about adb, fastboot, TWRP, and having the ultimate goal of discovering which partition has an unexpected hash, determining if this meant a rootkit or file corruption, and fixing the error, I've hit many brick walls.

For a day or two, I avoided seeing if the power button would allow it to boot, because if there was a rootkit, I didn't want it to run. I was disappointed to learn that through fastboot (specifically, I mean the fastboot PC program that connects to the droid when in fastboot mode), there is no way to do something like a full bitwise image of the internal storage, and analyze the situation in linux. Or, any type of backup whatsoever. I was frustrated to learn from another XDA thread about a lot of problems others have had rooting and/or installing TWRP on this device. I was frustrated to see there is no prebuilt version of TWRP for my device. (There is an image for the Asus ZenFone 5z 2018 ZS620KL which is very different than my Zenfone V520KL V.)

I realized with my particular device, I think, the only way I was going to take any next step required hitting the power button. (As I mentioned way above, that's when I found it appears to work fine, and I eventually did a factory reset.)

I attempted using the TWRP recovery.img posted by game #1 in that XDA thread about my device, but like he encountered, fastboot boot recovery.img doesn't work, and just reboots instead.

Without being able to extract the original recovery.img, I'm not sure that I'm willing to install his and see if it works for me. I was frustrated to find there appears to be no way to extract the original recovery.img without first having root access. All non-root methods I later found to do this didn't work. Notably, su can't run anymore through adb, and adb root can't run with a user build.

I've looked a bit at custom compiling TWRP myself, but haven't done that yet. In part, because if my version doesn't work through fastboot boot recovery.img, I'd have the same concern about overwriting the original one before getting some feedback here. Also in part, because I haven't looked enough to find how someone goes about making a BoardConfig.mk and the device tree from scratch.