> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/port/di-12-zhang-an-quan/12.2.-xiu-fu-an-quan-lou-dong.md).

# 12.2.修复安全漏洞

在谈到 Ports 和包时，安全漏洞可能最初出现在原始发行版或 Port 文件中。在前一种情况下，原始软件开发者可能会立即发布补丁或新版本。请根据作者的修复及时更新 Port。如果由于某种原因修复被延迟，你可以[标记该 Port 为 `FORBIDDEN`](https://docs.freebsd.org/en/books/porters-handbook/porting-dads/#dads-noinstall) 或向 Port 引入补丁文件。如果 Port 本身存在漏洞，请尽快修复该 Port。在这两种情况下，除非有权直接提交到 Ports 树，否则应遵循[提交更改的标准流程](https://docs.freebsd.org/en/books/porters-handbook/port-upgrading/#port-upgrading)。

> **重要**
>
> 成为 Ports 提交者并不足以随意提交 Port。切记，Port 通常有各自维护者，必须尊重他们。

请确保在漏洞修复后，尽快更新该 Port 的版本号。这样，定期升级已安装包的用户就能看到他们需要运行更新。此外，新的包将通过 FTP 和 WWW 镜像重新构建并分发，替换掉易受攻击的版本。如果修复漏洞过程中 `DISTVERSION` 没有变化，则增加 `PORTREVISION`。也就是说，如果向 Port 添加了补丁文件，则增加 `PORTREVISION`，但如果更新 Port 到最新软件版本并已修改 `DISTVERSION`，则不增加它。更多信息请参考[相关部分](https://docs.freebsd.org/en/books/porters-handbook/makefiles/#makefile-naming-revepoch)。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/port/di-12-zhang-an-quan/12.2.-xiu-fu-an-quan-lou-dong.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
