[26.04_linux-nvidia-bos] NVIDIA: SAUCE: ovl: keep err zero after successful ovl_cache_get()#423
Conversation
a5df430 to
302f717
Compare
Boro reviewLatest watcher review: open review Head: This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review. |
302f717 to
3fd3bd3
Compare
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 1 commits...
Cherry-pick digest:
E: 124a0b515cae ("NVIDIA: SAUCE: ovl: keep err zero after "): backport trailer order: MISSING: backporter SOB after (backported from)
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 124a0b515cae │ ovl: keep err zero after successful ovl_cache_get() │ match │ found │ MISSING: backporter SOB a │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘
Lint: all checks passed.
|
3fd3bd3 to
7a40987
Compare
|
Wow, nice find. And Sashiko's happy with the patch: https://sashiko.dev/#/message/20260514144258.3068715-1-nirmoyd%40nvidia.com
|
7a40987 to
6e81fbf
Compare
6e81fbf to
0b2ead9
Compare
|
Reviewed the patch manually and with Codex, no issues.
@nirmoy Couple of follow-up questions...
|
I did that but looks I did in the original one https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2150636 but here I linked the newer LP
Ack
Thanks |
Like Amir said it was demonic :D
Thanks |
clsotog
left a comment
There was a problem hiding this comment.
Acked-by: Carol L Soto <csoto@nvidia.com>
We will need this for 26.04_linux-nvidia too.
BugLink: https://bugs.launchpad.net/bugs/2150640 ovl_iterate_merged() stores PTR_ERR(cache) in err before checking IS_ERR(cache). On success err holds the truncated cache pointer and can be returned as a bogus non-zero error. The syzbot reproducer reaches this through overlay-on-overlay readdir: getdents64 iterate_dir(outer overlay file) ovl_iterate_merged() ovl_cache_get() ovl_dir_read_merged() ovl_dir_read() iterate_dir(inner overlay file) ovl_iterate_merged() Only compute PTR_ERR(cache) on the error path. Fixes: d25e4b7 ("ovl: refactor ovl_iterate() and port to cred guard") Reported-by: syzbot+a16fb0cce329a320661c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a16fb0cce329a320661c Cc: stable@vger.kernel.org Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com> Acked-by: Jamie Nguyen <jamien@nvidia.com> Acked-by: Matthew R. Ochs <mochs@nvidia.com> Acked-by: Carol L Soto <csoto@nvidia.com> (backported from https://lore.kernel.org/r/20260514144258.3068715-1-nirmoyd@nvidia.com)
0b2ead9 to
124a0b5
Compare
#425 added a draft PR so we can get that in if the fix is not merged by Monday |
|
@nirmoy Two comments...
Merged, closing PR. |
Summary
Fix NVBug 6144764 by keeping
errzero after a successfulovl_cache_get()inovl_iterate_merged().The installer crash is an overlayfs readdir failure while rsync reads through overlayfs during BaseOS/DGX OS installation. The bad path is the same as syzbot
a16fb0cce329a320661c: a successful cache pointer is passed toPTR_ERR(), truncating pointer bits into a bogusintthat can later be returned as a non-errno value.Bug Links
NVBug Evidence
ovl_iterate_merged()fromgetdents64()on7.0.0-2005-nvidia-bos.Validation
upstream/26.04_linux-nvidia-bos.git show --check --format=short HEAD: clean.scripts/checkpatch.pl --strict --ignore COMMIT_LOG_USE_LINK,COMMIT_LOG_LONG_LINE --git HEAD: 0 errors, 0 warnings.scripts/checkpatch.pl --strict --git HEADwarns on UbuntuBugLink:and the long downstream(backported from ...)lore URL line.OVL_SYZ_DONE rc=0and no Oops/KASAN/panic markers.Notes
The patch is also posted upstream: