# 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: 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:

```
GET https://porters-handbook.bsdcn.org/di-12-zhang-an-quan/12.2.-xiu-fu-an-quan-lou-dong.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
