| Summary: | Fix a possible Null pointer dereference in svc_dg_create() | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Zhou Qingyang <zhou1615> | ||||
| Component: | kern | Assignee: | freebsd-bugs (Nobody) <bugs> | ||||
| Status: | Closed Not A Bug | ||||||
| Severity: | Affects Many People | CC: | kib | ||||
| Priority: | --- | ||||||
| Version: | Unspecified | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
See explanation in PR #261454. |
Created attachment 231295 [details] A simple fix for this bug In sys/rpc/svc_dg.c file, the return value of svc_xprt_alloc() is assigned to xprt and there is a dereference of it right after that, which would lead to NULL pointer dereference on failure of allocation. Fix this bug by adding a NULL check of xprt. This bug is found by static analyzer, please advise.