Page MenuHomeFreeBSD

Protect calls to mtod() from accessing NULL mbufs
ClosedPublic

Authored by gnn on Jan 3 2017, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 3, 7:33 AM
Unknown Object (File)
Sun, Mar 3, 7:06 AM
Unknown Object (File)
Feb 13 2024, 10:31 AM
Unknown Object (File)
Jan 29 2024, 1:05 PM
Unknown Object (File)
Jan 9 2024, 11:37 AM
Unknown Object (File)
Dec 25 2023, 3:53 AM
Unknown Object (File)
Dec 23 2023, 1:19 AM
Unknown Object (File)
Dec 20 2023, 1:48 AM
Subscribers

Details

Summary
Test Plan

Trace all debug output using a modified tcpdebug script that looks at all sockets

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6552
Build 6775: arc lint + arc unit

Event Timeline

gnn retitled this revision from to Protect calls to mtod() from accessing NULL mbufs.
gnn updated this object.
gnn edited the test plan for this revision. (Show Details)
gnn added a reviewer: hiren.

Is it possible to handle 'm' being null in TCP_PROBE3() instead of these if/else checks everywhere?

hiren edited edge metadata.
hiren added a subscriber: avg.

I could make an uglier macro. If that would please the audience.

In D9035#186666, @gnn wrote:

I could make an uglier macro. If that would please the audience.

Hah. Uglier macro in one place might probably be better?

I'll see what others have to say. :-)

Have you checked generated assembly? This likely executes a branch regardless of whether SDT is enabled. On the other putting the check in the macro should get around that.

We actually don't need mtod() at all. If you want the mbuf, use the mbuf provider.

hiren edited edge metadata.
This revision is now accepted and ready to land.Jan 4 2017, 2:11 AM
This revision was automatically updated to reflect the committed changes.