Skip to content

Conversation

@a-nogikh
Copy link
Collaborator

See individual commits.

@a-nogikh a-nogikh force-pushed the features/assorted-socket-fixes branch 2 times, most recently from 6c77306 to 367f383 Compare September 12, 2025 12:56
@a-nogikh
Copy link
Collaborator Author

The tests are failing with:

2025/09/12 13:01:21 [FATAL] generating resource type from GroupType with 3 elements

Looks like the syz_create_resource approach does not make syz-trace2syz happy:

case *parser.GroupType:
if len(a.Elems) == 1 {
// For example: 5028 ioctl(3, SIOCSPGRP, [0]) = 0
// last argument is a pointer to a resource. Strace will output a pointer to
// a number x as [x].
res := prog.MakeResultArg(syzType, dir, nil, syzType.Default())
ctx.returnCache.cache(syzType, a.Elems[0], res)
return res
}
log.Fatalf("generating resource type from GroupType with %d elements", len(a.Elems))

We could adjust the tests and silence the error, but it means the tool becomes (even more) broken.

Cc @dvyukov

@dvyukov
Copy link
Collaborator

dvyukov commented Sep 15, 2025

We could adjust the tests and silence the error, but it means the tool becomes (even more) broken.

Adjust/disable tests. To the best of my knowledge nobody never used this tool.
It will be broken in such ways always by design. It should have not used strace in the first place.

@a-nogikh a-nogikh force-pushed the features/assorted-socket-fixes branch from 367f383 to c2a6945 Compare September 15, 2025 15:12
@a-nogikh
Copy link
Collaborator Author

a-nogikh commented Sep 15, 2025

Dropped the tests, now all CI checks pass.

The only concern is that bind$inet is mentioned > 700 times in our corpus, so syzbot will have to rediscover a lot of its current corpus programs, but maybe it's not that bad.

@a-nogikh a-nogikh marked this pull request as ready for review September 15, 2025 17:42
@dvyukov
Copy link
Collaborator

dvyukov commented Sep 16, 2025

sys/linux: use strinoz in setsockopt

stringnoz

@dvyukov
Copy link
Collaborator

dvyukov commented Sep 16, 2025

You also had some seed that uses these calls. Do you want to add it?

The syscall expects non-zero terminated strings.
This is the proper level for TLS_RX/TLS_TX opts.
@a-nogikh a-nogikh force-pushed the features/assorted-socket-fixes branch from c2a6945 to 4951e34 Compare September 16, 2025 09:06
@a-nogikh
Copy link
Collaborator Author

You also had some seed that uses these calls. Do you want to add it?

Not yet, still not sure if the seed brings any actual value (it doesn't help discover the crash during fuzzing, not sure about it giving extra coverage yet).

@a-nogikh a-nogikh requested a review from dvyukov September 16, 2025 09:34
@a-nogikh
Copy link
Collaborator Author

@dvyukov PTAL

@a-nogikh a-nogikh added this pull request to the merge queue Sep 22, 2025
Merged via the queue into google:master with commit a858c66 Sep 22, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants