func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void do_warn(SV* h, int rc, char* what)
{
dTHX;
D_imp_xxh(h);
SV *errstr = DBIc_ERRSTR(imp_xxh);
sv_setiv(DBIc_ERR(imp_xxh), (IV)rc); /* set err early */
sv_setpv(errstr, what);
/* NO EFFECT DBIh_EVENT2(h, WARN_event, DBIc_ERR(imp_xxh), errstr);*/
if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBI... | 0 | [
"CWE-416"
] | DBD-mysql | 3619c170461a3107a258d1fd2d00ed4832adb1b1 | 251,145,876,788,345,540,000,000,000,000,000,000,000 | 14 | Fix use-after-free for repeated fetchrow_arrayref calls when mysql_server_prepare=1
Function dbd_st_fetch() via Renew() can reallocate output buffer for
mysql_stmt_fetch() call. But it does not update pointer to that buffer in
imp_sth->stmt structure initialized by mysql_stmt_bind_result() function.
That leads to use-... |
remove_invalid_intro_points(rend_service_t *service,
smartlist_t *exclude_nodes,
smartlist_t *retry_nodes, time_t now)
{
tor_assert(service);
/* Remove any expired nodes that doesn't have a circuit. */
SMARTLIST_FOREACH_BEGIN(service->expiring_nodes, rend_i... | 0 | [
"CWE-532"
] | tor | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 | 180,315,331,920,483,300,000,000,000,000,000,000,000 | 82 | Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380 |
rsvg_filter_primitive_flood_render (RsvgNode *node, RsvgFilterPrimitive *primitive, RsvgFilterContext *ctx)
{
RsvgState *state;
guchar i;
gint x, y;
gint rowstride, height, width;
RsvgIRect boundarys;
guchar *output_pixels;
cairo_surface_t *output;
char pixcolor[4];
RsvgFilterPrimiti... | 0 | [
"CWE-369"
] | librsvg | ecf9267a24b2c3c0cd211dbdfa9ef2232511972a | 81,542,514,002,722,160,000,000,000,000,000,000,000 | 48 | bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs
We were making the decision to use box blurs, instead of a true
Gaussian kernel, based on the size of *both* x and y dimensions. Do
them individually instead. |
static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS)
{
const char* loc_name = NULL;
int loc_name_len = 0;
const char* disp_loc_name = NULL;
int disp_loc_name_len = 0;
int free_loc_name = 0;
UChar* disp_name = NULL;
in... | 0 | [
"CWE-125"
] | php-src | 97eff7eb57fc2320c267a949cffd622c38712484 | 110,259,069,192,041,930,000,000,000,000,000,000,000 | 134 | Fix bug #72241: get_icu_value_internal out-of-bounds read |
void StreamResource::PushStreamListener(StreamListener* listener) {
CHECK_NOT_NULL(listener);
CHECK_NULL(listener->stream_);
listener->previous_listener_ = listener_;
listener->stream_ = this;
listener_ = listener;
} | 0 | [
"CWE-416"
] | node | 4f8772f9b731118628256189b73cd202149bbd97 | 211,972,410,346,587,170,000,000,000,000,000,000,000 | 9 | src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously
destroyed.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103
PR-URL: https://github.com/nodejs-private/... |
add_args (GPtrArray *argv_array, ...)
{
va_list args;
const gchar *arg;
va_start (args, argv_array);
while ((arg = va_arg (args, const gchar *)))
g_ptr_array_add (argv_array, g_strdup (arg));
va_end (args);
} | 0 | [
"CWE-20"
] | flatpak | 902fb713990a8f968ea4350c7c2a27ff46f1a6c4 | 321,309,427,493,498,000,000,000,000,000,000,000,000 | 10 | Use seccomp to filter out TIOCSTI ioctl
This would otherwise let the sandbox add input to the controlling tty. |
static PyObject *Adapter_ssl_var_lookup(AdapterObject *self, PyObject *args)
{
APR_OPTIONAL_FN_TYPE(ssl_var_lookup) *ssl_var_lookup = 0;
PyObject *item = NULL;
PyObject *latin_item = NULL;
char *name = 0;
char *value = 0;
if (!self->r) {
PyErr_SetString(PyExc_RuntimeError, "request ob... | 0 | [
"CWE-254"
] | mod_wsgi | 545354a80b9cc20d8b6916ca30542eab36c3b8bd | 271,096,636,990,118,650,000,000,000,000,000,000,000 | 71 | When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state. |
struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
const struct sctp_bind_addr *bp,
gfp_t gfp, int vparam_len)
{
struct net *net = sock_net(asoc->base.sk);
sctp_inithdr_t init;
union sctp_params addrs;
size_t chunksize;
struct sctp_chunk *retval = NULL;
int num_types, addrs_len... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 124,274,824,561,589,790,000,000,000,000,000,000,000 | 163 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static void hci_cc_le_del_from_white_list(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_cp_le_del_from_white_list *sent;
__u8 status = *((__u8 *) skb->data);
BT_DBG("%s status 0x%2.2x", hdev->name, status);
if (status)
return;
sent = hci_sent_cmd_data(hdev, HCI_OP_LE_DEL_FROM_WHITE_LIST);
if... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 128,290,453,503,878,220,000,000,000,000,000,000,000 | 18 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
s16 rssi_compensation_reverse_calc(struct ar6_softc *ar, s16 rssi, bool Above)
{
s16 i;
if (ar->arBssChannel > 5000)
{
if (rssi_compensation_param.enable)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, (">>> 11a\n"));
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("rssi before rev compensation... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 98,778,631,688,906,850,000,000,000,000,000,000,000 | 43 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
ldns_rr2str(const ldns_rr *rr)
{
return ldns_rr2str_fmt(ldns_output_format_default, rr);
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 316,813,813,899,745,360,000,000,000,000,000,000,000 | 4 | CAA and URI |
out_char_nf(int c)
{
out_buf[out_pos++] = (unsigned)c;
if (out_pos >= OUT_SIZE)
out_flush();
return (unsigned)c;
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 16,918,519,236,551,058,000,000,000,000,000,000,000 | 8 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk,
struct msghdr *msg, size_t msg_len)
{
struct sctp_sock *sp;
struct sctp_endpoint *ep;
struct sctp_association *new_asoc=NULL, *asoc=NULL;
struct sctp_transport *transport, *chunk_tp;
struct sctp_chunk *chunk;
union sctp_addr to;
struct soc... | 0 | [
"CWE-476"
] | linux | ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d | 270,979,777,693,250,050,000,000,000,000,000,000,000 | 403 | [SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message
In current implementation, LKSCTP does receive buffer accounting for
data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do
accounting for data in frag_list when data is fragmented. In addition,
LKSCTP doesn't do accounting for data in ... |
add_linux_security_label_to_credentials (int client_fd,
DBusCredentials *credentials)
{
#if defined(__linux__) && defined(SO_PEERSEC)
DBusString buf;
socklen_t len = 1024;
dbus_bool_t oom = FALSE;
if (!_dbus_string_init_preallocated (&buf, len) ||
!_d... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 297,712,037,647,241,870,000,000,000,000,000,000,000 | 96 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
int enc_untrusted_fchown(int fd, uid_t owner, gid_t group) {
return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_fchown,
fd, owner, group);
} | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 292,532,047,771,047,160,000,000,000,000,000,000,000 | 4 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
ppp_get_stats(struct ppp *ppp, struct ppp_stats *st)
{
struct slcompress *vj = ppp->vj;
memset(st, 0, sizeof(*st));
st->p.ppp_ipackets = ppp->stats64.rx_packets;
st->p.ppp_ierrors = ppp->dev->stats.rx_errors;
st->p.ppp_ibytes = ppp->stats64.rx_bytes;
st->p.ppp_opackets = ppp->stats64.tx_packets;
st->p.ppp_oerro... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 252,886,673,571,048,180,000,000,000,000,000,000,000 | 22 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
int StreamBase::Writev(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
CHECK(args[0]->IsObject());
CHECK(args[1]->IsArray());
Local<Object> req_wrap_obj = args[0].As<Object>();
Local<Array> chunks = args[1].As<Array>();
bool all_buffers = args[2]->IsTrue();
... | 0 | [
"CWE-416"
] | node | 4f8772f9b731118628256189b73cd202149bbd97 | 2,697,077,507,201,071,000,000,000,000,000,000,000 | 96 | src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously
destroyed.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103
PR-URL: https://github.com/nodejs-private/... |
_rpc_reattach_tasks(slurm_msg_t *msg)
{
reattach_tasks_request_msg_t *req = msg->data;
reattach_tasks_response_msg_t *resp =
xmalloc(sizeof(reattach_tasks_response_msg_t));
slurm_msg_t resp_msg;
int rc = SLURM_SUCCESS;
uint16_t port = 0;
char host[MAXHOSTNAMELEN];
slu... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 294,210,594,011,819,700,000,000,000,000,000,000,000 | 111 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
rsvg_handle_get_metadata (RsvgHandle * handle)
{
g_return_val_if_fail (handle, NULL);
if (handle->priv->metadata)
return handle->priv->metadata->str;
else
return NULL;
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 60,752,175,624,286,390,000,000,000,000,000,000,000 | 9 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static struct hid_input *hidinput_match(struct hid_report *report)
{
struct hid_device *hid = report->device;
struct hid_input *hidinput;
list_for_each_entry(hidinput, &hid->inputs, list) {
if (hidinput->report &&
hidinput->report->id == report->id)
return hidinput;
}
return NULL;
} | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 222,984,968,840,465,900,000,000,000,000,000,000,000 | 13 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... |
xmlNewProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value) {
if (name == NULL) {
#ifdef DEBUG_TREE
xmlGenericError(xmlGenericErrorContext,
"xmlNewProp : name == NULL\n");
#endif
return(NULL);
}
return xmlNewPropInternal(node, NULL, name, value, 0);
} | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 230,759,015,971,498,850,000,000,000,000,000,000,000 | 12 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
//! Access to pixel value with Dirichlet boundary conditions for the coordinate (\c pos) \const.
T atN(const int pos, const int x, const int y, const int z, const int c, const T& out_value) const {
return (pos<0 || pos>=(int)_width)?out_value:(*this)(pos,x,y,z,c); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 125,594,877,279,507,190,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
bgp_capability_msg_parse (struct peer *peer, u_char *pnt, bgp_size_t length)
{
u_char *end;
struct capability cap;
u_char action;
struct bgp *bgp;
afi_t afi;
safi_t safi;
bgp = peer->bgp;
end = pnt + length;
while (pnt < end)
{
/* We need at least action, capability code and capability len... | 1 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 68,687,368,830,087,040,000,000,000,000,000,000,000 | 107 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
void update_rx_quality( )
{
unsigned int time_diff, capt_time, miss_time;
int missed_frames;
struct AP_info *ap_cur = NULL;
struct ST_info *st_cur = NULL;
struct timeval cur_time;
ap_cur = G.ap_1st;
st_cur = G.st_1st;
gettimeofday( &cur_time, NULL );
/* accesspoints */
while( ... | 0 | [
"CWE-787"
] | aircrack-ng | ff70494dd389ba570dbdbf36f217c28d4381c6b5 | 64,454,154,579,553,690,000,000,000,000,000,000,000 | 72 | Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab |
TEST_F(Http1ServerConnectionImplTest, IgnoreUpgradeH2c) {
initialize();
TestRequestHeaderMapImpl expected_headers{
{":authority", "www.somewhere.com"}, {":path", "/"}, {":method", "GET"}};
Buffer::OwnedImpl buffer(
"GET http://www.somewhere.com/ HTTP/1.1\r\nConnection: "
"Upgrade, HTTP2-Setting... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 302,720,916,592,846,600,000,000,000,000,000,000,000 | 10 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
de265_error decoder_context::read_pps_NAL(bitreader& reader)
{
logdebug(LogHeaders,"----> read PPS\n");
std::shared_ptr<pic_parameter_set> new_pps = std::make_shared<pic_parameter_set>();
bool success = new_pps->read(&reader,this);
if (param_pps_headers_fd>=0) {
new_pps->dump(param_pps_headers_fd);
}
... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 13,473,634,164,039,712,000,000,000,000,000,000,000 | 18 | fix streams where SPS image size changes without refreshing PPS (#299) |
QPDFObjectHandle::eraseItem(int at)
{
assertArray();
return dynamic_cast<QPDF_Array*>(obj.getPointer())->eraseItem(at);
} | 0 | [
"CWE-835"
] | qpdf | afe0242b263a9e1a8d51dd81e42ab6de2e5127eb | 302,994,233,426,990,240,000,000,000,000,000,000,000 | 5 | Handle object ID 0 (fixes #99)
This is CVE-2017-9208.
The QPDF library uses object ID 0 internally as a sentinel to
represent a direct object, but prior to this fix, was not blocking
handling of 0 0 obj or 0 0 R as a special case. Creating an object in
the file with 0 0 obj could cause various infinite loops. The PDF... |
template<typename tc>
CImg<T>& draw_triangle(const int x0, const int y0,
const int x1, const int y1,
const int x2, const int y2,
const tc *const color, const float opacity,
const unsigned int pattern) {
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 11,114,204,854,607,378,000,000,000,000,000,000,000 | 15 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void ssl_log_error(const char *fmt, ...)
{
va_list ap;
va_start(ap, fmt);
pn_vlogf(fmt, ap);
va_end(ap);
} | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 115,708,044,623,386,770,000,000,000,000,000,000,000 | 7 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
TEST_P(Http2IntegrationTest, GrpcRequestTimeout) {
config_helper_.addConfigModifier(
[&](envoy::config::filter::network::http_connection_manager::v2::HttpConnectionManager& hcm)
-> void {
auto* route_config = hcm.mutable_route_config();
auto* virtual_host = route_config->mutable_virtua... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 242,192,986,813,489,460,000,000,000,000,000,000,000 | 32 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
uint_t aubio_onset_get_minioi(const aubio_onset_t * o) {
return o->minioi;
} | 0 | [] | aubio | e4e0861cffbc8d3a53dcd18f9ae85797690d67c7 | 92,770,909,999,370,370,000,000,000,000,000,000,000 | 3 | [onset] safer deletion method |
fill_glyph_hash(ASS_Renderer *priv, OutlineHashKey *outline_key,
GlyphInfo *info)
{
if (info->drawing) {
DrawingHashKey *key = &outline_key->u.drawing;
outline_key->type = OUTLINE_DRAWING;
key->scale_x = double_to_d16(info->scale_x);
key->scale_y = double_to_d16(info-... | 0 | [
"CWE-125"
] | libass | f4f48950788b91c6a30029cc28a240b834713ea7 | 32,376,281,668,896,165,000,000,000,000,000,000,000 | 38 | Fix line wrapping mode 0/3 bugs
This fixes two separate bugs:
a) Don't move a linebreak into the first symbol. This results in a empty
line at the front, which does not help to equalize line lengths at all.
Instead, merge line with the second one.
b) When moving a linebreak into a symbol that already is a break... |
std::size_t get_tuple_bytes(const Tuple& tuple) {
return std::accumulate(tuple.begin(), tuple.end(),
static_cast<std::size_t>(0),
[](const std::size_t& lhs, const Tensor& rhs) {
return lhs + rhs.TotalBytes();
... | 0 | [
"CWE-20",
"CWE-476"
] | tensorflow | d7de67733925de196ec8863a33445b73f9562d1d | 321,476,327,813,853,800,000,000,000,000,000,000,000 | 7 | Prevent a CHECK-fail due to empty tensor input in `map_stage_op.cc`
PiperOrigin-RevId: 387737906
Change-Id: Idc52df0c71c7ed6e2dd633b651a581932f277c8a |
R_API RBinJavaCPTypeObj *r_bin_java_get_item_from_cp(RBinJavaObj *bin, int i) {
if (i < 1 || i > bin->cf.cp_count) {
return &R_BIN_JAVA_NULL_TYPE;
}
RBinJavaCPTypeObj *obj = (RBinJavaCPTypeObj *) r_list_get_n (bin->cp_list, i);
return obj ? obj : &R_BIN_JAVA_NULL_TYPE;
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 96,686,427,512,626,140,000,000,000,000,000,000,000 | 7 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
void HeaderMapImpl::addViaMove(HeaderString&& key, HeaderString&& value) {
// If this is an inline header, we can't addViaMove, because we'll overwrite
// the existing value.
auto* entry = getExistingInline(key.getStringView());
if (entry != nullptr) {
appendToHeader(entry->value(), value.getStringView());
... | 1 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 91,739,630,689,334,260,000,000,000,000,000,000,000 | 12 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
void ZrtpStateClass::evAckSent(void) {
DEBUGOUT((cout << "Checking for match in AckSent.\n"));
char *msg, first, last;
uint8_t *pkt;
uint32_t errorCode = 0;
/*
* First check the general event type, then discrimnate
* the real event.
*/
if (event->type == ZrtpPacket) {
p... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 72,613,238,741,590,260,000,000,000,000,000,000,000 | 139 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
static int handle_ir_dualbuffer_packet(struct context *context,
struct descriptor *d,
struct descriptor *last)
{
struct iso_context *ctx =
container_of(context, struct iso_context, context);
struct db_descriptor *db = (struct db_descriptor *) d;
__le32 *ir_header;
size_t header_length;
void... | 0 | [
"CWE-399"
] | linux-2.6 | 8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54 | 157,347,811,137,308,550,000,000,000,000,000,000,000 | 45 | firewire: ohci: handle receive packets with a data length of zero
Queueing to receive an ISO packet with a payload length of zero
silently does nothing in dualbuffer mode, and crashes the kernel in
packet-per-buffer mode. Return an error in dualbuffer mode, because
the DMA controller won't let us do what we want, and... |
static u16 tcm_loop_get_fabric_sense_len(void)
{
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 299,510,352,662,019,260,000,000,000,000,000,000,000 | 4 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
static void netlink_forward_ring(struct netlink_ring *ring)
{
unsigned int head = ring->head, pos = head;
const struct nl_mmap_hdr *hdr;
do {
hdr = __netlink_lookup_frame(ring, pos);
if (hdr->nm_status == NL_MMAP_STATUS_UNUSED)
break;
if (hdr->nm_status != NL_MMAP_STATUS_SKIP)
break;
netlink_increment... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 261,558,764,517,188,100,000,000,000,000,000,000,000 | 14 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static unsigned int mqueue_poll_file(struct file *filp, struct poll_table_struct *poll_tab)
{
struct mqueue_inode_info *info = MQUEUE_I(file_inode(filp));
int retval = 0;
poll_wait(filp, &info->wait_q, poll_tab);
spin_lock(&info->lock);
if (info->attr.mq_curmsgs)
retval = POLLIN | POLLRDNORM;
if (info->attr.... | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 175,475,269,510,844,040,000,000,000,000,000,000,000 | 17 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
unspecial(const char *name)
{
struct tbl *tp;
tp = ktsearch(&specials, name, hash(name));
if (tp)
ktdelete(tp);
} | 0 | [] | mksh | de53d2df1c3b812c262cc1bddbfe0b3bfc25c14b | 251,908,071,987,111,440,000,000,000,000,000,000,000 | 8 | SECURITY: do not permit += from environment either
this makes our environment filter/sanitisation complete |
static void update_gt_cputime(struct task_cputime_atomic *cputime_atomic, struct task_cputime *sum)
{
__update_gt_cputime(&cputime_atomic->utime, sum->utime);
__update_gt_cputime(&cputime_atomic->stime, sum->stime);
__update_gt_cputime(&cputime_atomic->sum_exec_runtime, sum->sum_exec_runtime);
} | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 292,585,874,307,710,600,000,000,000,000,000,000,000 | 6 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
flatpak_dir_get_oci_summary_location (FlatpakDir *self,
const char *remote,
GError **error)
{
return flatpak_dir_get_oci_cache_file (self, remote, ".summary", error);
} | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 120,251,669,604,145,750,000,000,000,000,000,000,000 | 6 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
static inline void vring_used_flags_unset_bit(VirtQueue *vq, int mask)
{
hwaddr pa;
pa = vq->vring.used + offsetof(VRingUsed, flags);
stw_phys(pa, lduw_phys(pa) & ~mask);
} | 0 | [
"CWE-269"
] | qemu | 5f5a1318653c08e435cfa52f60b6a712815b659d | 64,374,525,328,812,180,000,000,000,000,000,000,000 | 6 | virtio: properly validate address before accessing config
There are several several issues in the current checking:
- The check was based on the minus of unsigned values which can overflow
- It was done after .{set|get}_config() which can lead crash when config_len
is zero since vdev->config is NULL
Fix this by:
... |
void CServer::ConchainSpecialInfoupdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
{
pfnCallback(pResult, pCallbackUserData);
if(pResult->NumArguments())
((CServer *)pUserData)->UpdateServerInfo();
} | 0 | [
"CWE-20"
] | teeworlds | a766cb44bcffcdb0b88e776d01c5ee1323d44f85 | 281,255,514,832,571,730,000,000,000,000,000,000,000 | 6 | fixed a server crash |
static int pxa2xx_i2c_initfn(SysBusDevice *sbd)
{
DeviceState *dev = DEVICE(sbd);
PXA2xxI2CState *s = PXA2XX_I2C(dev);
s->bus = i2c_init_bus(dev, "i2c");
memory_region_init_io(&s->iomem, OBJECT(s), &pxa2xx_i2c_ops, s,
"pxa2xx-i2c", s->region_size);
sysbus_init_mmio(sbd, &... | 0 | [
"CWE-119"
] | qemu | caa881abe0e01f9931125a0977ec33c5343e4aa7 | 175,372,694,070,652,350,000,000,000,000,000,000,000 | 14 | pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_leve... |
int main(int argc, char *argv[])
{
bool lrzcat = false, compat = false, recurse = false;
bool options_file = false, conf_file_compression_set = false; /* for environment and tracking of compression setting */
struct timeval start_time, end_time;
struct sigaction handler;
double seconds,total_time; // for timers
b... | 0 | [
"CWE-703",
"CWE-787"
] | lrzip | 5faf80cd53ecfd16b636d653483144cd12004f46 | 164,790,066,687,096,330,000,000,000,000,000,000,000 | 427 | Fix control->suffix being deallocated as heap memory as reported by Pietro Borrello. |
static CURLcode tftp_doing(struct connectdata *conn, bool *dophase_done)
{
CURLcode result;
result = tftp_multi_statemach(conn, dophase_done);
if(*dophase_done) {
DEBUGF(infof(conn->data, "DO phase is complete\n"));
}
else if(!result) {
/* The multi code doesn't have this logic for the DOING state so... | 0 | [
"CWE-787"
] | curl | facb0e4662415b5f28163e853dc6742ac5fafb3d | 62,981,309,812,955,790,000,000,000,000,000,000,000 | 19 | tftp: Alloc maximum blksize, and use default unless OACK is received
Fixes potential buffer overflow from 'recvfrom()', should the server
return an OACK without blksize.
Bug: https://curl.haxx.se/docs/CVE-2019-5482.html
CVE-2019-5482 |
nma_set_networking_enabled_cb (GtkWidget *widget, NMApplet *applet)
{
gboolean state;
g_return_if_fail (applet != NULL);
state = gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (widget));
nm_client_sleep (applet->nm_client, !state);
} | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 11,878,651,203,996,247,000,000,000,000,000,000,000 | 9 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
create_file(ngx_cycle_t *cycle, const u_char *filename, const u_char *contents, size_t len, uid_t uid, gid_t gid) {
FILE *f;
int ret;
size_t total_written = 0, written;
f = fopen((const char *) filename, "w");
if (f != NULL) {
/* We must do something with these return values because
... | 0 | [
"CWE-362"
] | passenger | 207870f5b7f5cc240587ab0977d6046782ae1d86 | 280,727,855,824,520,730,000,000,000,000,000,000,000 | 30 | Fix privilege escalation in the Nginx module
The vulnerability is exploitable with a non-standard
passenger_instance_registry_dir, via a race condition where after a file
was created, it was chowned via the path not the file descriptor.
The chown entered the code in 2010, so Passenger 4 + 5 all affected. |
static void __detach_discard_cmd(struct discard_cmd_control *dcc,
struct discard_cmd *dc)
{
if (dc->state == D_DONE)
atomic_dec(&dcc->issing_discard);
list_del(&dc->list);
rb_erase(&dc->rb_node, &dcc->root);
dcc->undiscard_blks -= dc->len;
kmem_cache_free(discard_cmd_slab, dc);
atomic_dec(&dcc->discar... | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 95,973,979,091,255,640,000,000,000,000,000,000,000 | 14 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
DefragContextDestroy(DefragContext *dc)
{
if (dc == NULL)
return;
PoolFree(dc->frag_pool);
SCFree(dc);
} | 0 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 23,691,138,931,028,235,000,000,000,000,000,000,000 | 8 | defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host. |
static int has_line(struct libscols_table *table, struct libmnt_fs *fs)
{
struct libscols_line *ln;
struct libscols_iter *itr;
int rc = 0;
itr = scols_new_iter(SCOLS_ITER_FORWARD);
if (!itr)
return 0;
while (scols_table_next_line(table, itr, &ln) == 0) {
if ((struct libmnt_fs *) scols_line_get_userdata(ln) ... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 325,172,127,951,598,400,000,000,000,000,000,000,000 | 20 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
static int resolve_host(struct parsed_mount_info *parsed_info)
{
int rc;
/* 10 for max width of decimal scopeid */
char tmpbuf[NI_MAXHOST + 1 + 10 + 1];
const char *ipaddr;
size_t len;
struct addrinfo *addrlist, *addr;
struct sockaddr_in *sin;
struct sockaddr_in6 *sin6;
rc = getaddrinfo(parsed_info->host, NUL... | 0 | [
"CWE-362"
] | cifs-utils | 810f7e4e0f2dbcbee0294d9b371071cb08268200 | 314,895,473,370,458,570,000,000,000,000,000,000,000 | 79 | mount.cifs: guard against signals by unprivileged users
If mount.cifs is setuid root, then the unprivileged user who runs the
program can send the mount.cifs process a signal and kill it. This is
not a huge problem unless we happen to be updating the mtab at the
time, in which case the mtab lockfiles might not get cle... |
gfn_to_memslot_dirty_bitmap(struct kvm_vcpu *vcpu, gfn_t gfn,
bool no_dirty_log)
{
struct kvm_memory_slot *slot;
slot = kvm_vcpu_gfn_to_memslot(vcpu, gfn);
if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
return NULL;
if (no_dirty_log && kvm_slot_dirty_track_enabled(slot))
return NULL;
return slot;
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 115,118,966,286,687,940,000,000,000,000,000,000,000 | 13 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
static void perf_event_free_bpf_prog(struct perf_event *event)
{
struct bpf_prog *prog;
if (!event->tp_event)
return;
prog = event->tp_event->prog;
if (prog) {
event->tp_event->prog = NULL;
bpf_prog_put(prog);
}
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 72,138,967,073,129,590,000,000,000,000,000,000,000 | 13 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
get_max_name_length (GFile *file_dir)
{
int max_length;
char *dir;
long max_path;
long max_name;
max_length = -1;
if (!g_file_has_uri_scheme (file_dir, "file"))
return max_length;
dir = g_file_get_path (file_dir);
if (!dir)
return max_length;
max_path = pathconf (dir, _PC_PATH_MAX);
max_name = pathcon... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 180,195,247,920,073,740,000,000,000,000,000,000,000 | 37 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
static void sapi_run_header_callback(TSRMLS_D)
{
int error;
zend_fcall_info fci;
char *callback_name = NULL;
char *callback_error = NULL;
zval *retval_ptr = NULL;
if (zend_fcall_info_init(SG(callback_func), 0, &fci, &SG(fci_cache), &callback_name, &callback_error TSRMLS_CC) == SUCCESS) {
fci.retval_ptr_ptr =... | 0 | [
"CWE-601"
] | php-src | 98b9dfaec95e6f910f125ed172cdbd25abd006ec | 329,293,745,852,227,840,000,000,000,000,000,000,000 | 29 | Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
local environment |
aclitem_match(const AclItem *a1, const AclItem *a2)
{
return a1->ai_grantee == a2->ai_grantee &&
a1->ai_grantor == a2->ai_grantor;
} | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 128,356,049,958,122,400,000,000,000,000,000,000,000 | 5 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
bool AddListener(CWebSock& WebSock, CTemplate& Tmpl) {
unsigned short uPort = WebSock.GetParam("port").ToUShort();
CString sHost = WebSock.GetParam("host");
CString sURIPrefix = WebSock.GetParam("uriprefix");
if (sHost == "*") sHost = "";
bool bSSL = WebSock.GetParam("ssl").ToBool();
bool bIPv4 = WebSock.G... | 0 | [] | znc | 5e6e3be32acfeadeaf1fb3bb17bada08aec6432f | 126,989,161,703,764,520,000,000,000,000,000,000,000 | 57 | webadmin/add channel: Correctly handle channel names
The CChan constructor makes sure that the channel name begins with a valid
channel prefix. Thus, this could change the name of the resulting channel.
When you edited an irc network which already had a channel "#foo", were
connected to IRC (so ZNC knows which prefix... |
int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
{
transaction_t *transaction = handle->h_transaction;
journal_t *journal;
tid_t tid;
int need_to_start, ret;
/* If we've had an abort of any type, don't even think about
* actually doing the restart! */
if (is_handle_aborted(handle))
... | 0 | [
"CWE-787"
] | linux | e09463f220ca9a1a1ecfda84fcda658f99a1f12a | 99,899,725,195,347,600,000,000,000,000,000,000,000 | 52 | jbd2: don't mark block as modified if the handle is out of credits
Do not set the b_modified flag in block's journal head should not
until after we're sure that jbd2_journal_dirty_metadat() will not
abort with an error due to there not being enough space reserved in
the jbd2 handle.
Otherwise, future attempts to modi... |
void CLASS process_Sony_0x9400(uchar *buf, ushort len, unsigned id)
{
uchar s[4];
int c;
uchar bufx = buf[0];
if (((bufx == 0x23) || (bufx == 0x24) || (bufx == 0x26)) && (len >= 0x1f))
{ // 0x9400 'c' version
if ((id == 358) || (id == 362) || (id == 363) || (id == 365) || (id == 366) || (id == 369))
... | 0 | [
"CWE-400"
] | LibRaw | e67a9862d10ebaa97712f532eca1eb5e2e410a22 | 35,330,589,227,460,215,000,000,000,000,000,000,000 | 68 | Fixed Secunia Advisory SA86384
- possible infinite loop in unpacked_load_raw()
- possible infinite loop in parse_rollei()
- possible infinite loop in parse_sinar_ia()
Credits: Laurent Delosieres, Secunia Research at Flexera |
STATIC ptr_t GC_find_limit_with_bound(ptr_t p, GC_bool up, ptr_t bound)
{
static volatile ptr_t result;
/* Safer if static, since otherwise it may not be */
/* preserved across the longjmp. Can safely be */
/* static since it's only called w... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 137,454,887,837,951,180,000,000,000,000,000,000,000 | 41 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
MONGO_EXPORT const char *bson_data( const bson *b ) {
return (const char *)b->data;
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 123,315,603,999,303,950,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
int msPostGISLayerSetTimeFilter(layerObj *lp, const char *timestring, const char *timefield)
{
char **atimes, **aranges = NULL;
int numtimes=0,i=0,numranges=0;
size_t buffer_size = 512;
char buffer[512], bufferTmp[512];
buffer[0] = '\0';
bufferTmp[0] = '\0';
if (!lp || !timestring || !timefield)
ret... | 1 | [
"CWE-89"
] | mapserver | 3a10f6b829297dae63492a8c63385044bc6953ed | 229,867,873,991,132,420,000,000,000,000,000,000,000 | 69 | Fix potential SQL Injection with postgis TIME filters (#4834) |
NTSTATUS smb_vfs_call_create_file(struct vfs_handle_struct *handle,
struct smb_request *req,
uint16_t root_dir_fid,
struct smb_filename *smb_fname,
uint32_t access_mask,
uint32_t share_access,
uint32_t create_disposition,
uint32_t create_options,
uint32_t file_attributes,... | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 83,559,130,793,379,800,000,000,000,000,000,000,000 | 28 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
static int sr_read_eeprom_word(struct usbnet *dev, u8 offset, void *value)
{
return sr_share_read_word(dev, 0, offset, value);
} | 0 | [] | linux | e9da0b56fe27206b49f39805f7dcda8a89379062 | 8,728,642,858,854,845,000,000,000,000,000,000,000 | 4 | sr9700: sanity check for packet length
A malicious device can leak heap data to user space
providing bogus frame lengths. Introduce a sanity check.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static ssize_t lbs_rdmac_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
struct lbs_private *priv = file->private_data;
ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
if (!buf)
return -ENOMEM;
buf_size = min(... | 0 | [
"CWE-703",
"CWE-189"
] | linux | a497e47d4aec37aaf8f13509f3ef3d1f6a717d88 | 63,921,286,939,841,660,000,000,000,000,000,000,000 | 22 | libertas: potential oops in debugfs
If we do a zero size allocation then it will oops. Also we can't be
sure the user passes us a NUL terminated string so I've added a
terminator.
This code can only be triggered by root.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-... |
*/
int dev_change_carrier(struct net_device *dev, bool new_carrier)
{
const struct net_device_ops *ops = dev->netdev_ops;
if (!ops->ndo_change_carrier)
return -EOPNOTSUPP;
if (!netif_device_present(dev))
return -ENODEV;
return ops->ndo_change_carrier(dev, new_carrier); | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 31,543,338,367,888,360,000,000,000,000,000,000,000 | 10 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
static int ldb_kv_index_add_el(struct ldb_module *module,
struct ldb_kv_private *ldb_kv,
const struct ldb_message *msg,
struct ldb_message_element *el)
{
unsigned int i;
for (i = 0; i < el->num_values; i++) {
int ret = ldb_kv_index_add1(module, ldb_kv, msg, el, i);
if (ret != LDB_SUC... | 0 | [
"CWE-20"
] | samba | 0998f2f1bced019db4000ef4b55887abcb65f6d2 | 243,254,620,250,800,270,000,000,000,000,000,000,000 | 15 | CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374 |
static int mac80211_hwsim_roc(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_channel *chan,
int duration,
enum ieee80211_roc_type type)
{
struct mac80211_hwsim_data *hwsim = hw->priv;
mutex_lock(&hwsim->mutex);
if (WARN_ON(hwsim->tmp_chan || hwsim->hw_scan_r... | 0 | [
"CWE-703",
"CWE-772"
] | linux | 0ddcff49b672239dda94d70d0fcf50317a9f4b51 | 338,416,001,536,379,880,000,000,000,000,000,000,000 | 24 | mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()
'hwname' is malloced in hwsim_new_radio_nl() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.
Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length")
Signed-off-by: Wei Yongjun <we... |
static int bin_pe_init_exports(RBinPEObj* pe) {
PE_(image_data_directory) * data_dir_export = &pe->data_directory[PE_IMAGE_DIRECTORY_ENTRY_EXPORT];
PE_DWord export_dir_paddr = PE_(va2pa) (pe, data_dir_export->VirtualAddress);
if (!export_dir_paddr) {
// This export-dir-paddr should only appear in DLL files
// pe... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 8,906,337,545,177,888,000,000,000,000,000,000,000 | 21 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
fr_tls_server_conf_t *tls_client_conf_parse(CONF_SECTION *cs)
{
fr_tls_server_conf_t *conf;
conf = cf_data_find(cs, "tls-conf");
if (conf) {
DEBUG2(LOG_PREFIX ": Using cached TLS configuration from previous invocation");
return conf;
}
conf = tls_server_conf_alloc(cs);
if (cf_section_parse(cs, conf, tls_cl... | 0 | [
"CWE-295"
] | freeradius-server | 874b39451702338389260edbfc52b381b20352ec | 81,482,708,197,079,710,000,000,000,000,000,000,000 | 44 | Set X509_V_FLAG_CRL_CHECK_ALL |
static inline void timer_base_unlock_expiry(struct timer_base *base)
{
spin_unlock(&base->expiry_lock);
} | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 255,118,973,775,276,860,000,000,000,000,000,000,000 | 4 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
static const char *wsgi_set_socket_prefix(cmd_parms *cmd, void *mconfig,
const char *arg)
{
const char *error = NULL;
WSGIServerConfig *sconfig = NULL;
error = ap_check_cmd_context(cmd, GLOBAL_ONLY);
if (error != NULL)
return error;
sconfig = ap_get... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 59,246,131,615,323,600,000,000,000,000,000,000,000 | 21 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
static void sched_irq_time_avg_update(struct rq *rq, u64 curr_irq_time) { } | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 142,283,532,420,380,400,000,000,000,000,000,000,000 | 1 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
local size_t grow(size_t size)
{
size_t was, top;
int shift;
was = size;
size += size >> 2;
top = size;
for (shift = 0; top > 7; shift++)
top >>= 1;
if (top == 7)
size = (size_t)1 << (shift + 3);
if (size < 16)
size = 16;
if (size <= was)
size = (size... | 0 | [
"CWE-703",
"CWE-22"
] | pigz | fdad1406b3ec809f4954ff7cdf9e99eb18c2458f | 325,954,646,468,134,260,000,000,000,000,000,000,000 | 18 | When decompressing with -N or -NT, strip any path from header name.
This uses the path of the compressed file combined with the name
from the header as the name of the decompressed output file. Any
path information in the header name is stripped. This avoids a
possible vulnerability where absolute or descending path... |
resolveSubtable (const char *table, const char *base, const char *searchPath)
{
char *tableFile;
static struct stat info;
if (table == NULL || table[0] == '\0')
return NULL;
tableFile = (char *) malloc (MAXSTRING * sizeof(char));
//
// First try to resolve against base
//
if (base)
{
... | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 310,516,758,386,943,980,000,000,000,000,000,000,000 | 58 | Merge branch 'table_resolver' |
String *Item_func_reverse::val_str(String *str)
{
DBUG_ASSERT(fixed == 1);
String *res = args[0]->val_str(str);
char *ptr, *end, *tmp;
if ((null_value=args[0]->null_value))
return 0;
/* An empty string is a special case as the string pointer may be null */
if (!res->length())
return make_empty_resu... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 129,998,003,630,522,910,000,000,000,000,000,000,000 | 47 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
void* Type_UcrBg_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
cmsUcrBg* Src = (cmsUcrBg*) Ptr;
cmsUcrBg* NewUcrBg = (cmsUcrBg*) _cmsMallocZero(self ->ContextID, sizeof(cmsUcrBg));
if (NewUcrBg == NULL) return NULL;
NewUcrBg ->Bg = cmsDupToneCurve(Src ->Bg);
New... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 287,749,740,636,802,600,000,000,000,000,000,000,000 | 15 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
static void mark_verifier_state_clean(struct bpf_verifier_env *env)
{
env->scratched_regs = 0U;
env->scratched_stack_slots = 0UL;
} | 0 | [] | linux | 34d3a78c681e8e7844b43d1a2f4671a04249c821 | 315,357,441,280,210,100,000,000,000,000,000,000,000 | 5 | bpf: Make per_cpu_ptr return rdonly PTR_TO_MEM.
Tag the return type of {per, this}_cpu_ptr with RDONLY_MEM. The
returned value of this pair of helpers is kernel object, which
can not be updated by bpf programs. Previously these two helpers
return PTR_OT_MEM for kernel objects of scalar type, which allows
one to direct... |
void nfs_commit_prepare(struct rpc_task *task, void *calldata)
{
struct nfs_commit_data *data = calldata;
NFS_PROTO(data->inode)->commit_rpc_prepare(task, data);
} | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 213,528,505,988,844,800,000,000,000,000,000,000,000 | 6 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
follow_huge_pmd(struct mm_struct *mm, unsigned long address,
pmd_t *pmd, int flags)
{
struct page *page = NULL;
spinlock_t *ptl;
pte_t pte;
retry:
ptl = pmd_lockptr(mm, pmd);
spin_lock(ptl);
/*
* make sure that the address range covered by this pmd is not
* unmapped from other threads.
*/
if (!pmd_huge(*... | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 177,976,655,348,647,970,000,000,000,000,000,000,000 | 35 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
static bool check_query_cache_type(sys_var *self, THD *thd, set_var *var)
{
if (query_cache.is_disabled())
{
my_error(ER_QUERY_CACHE_DISABLED, MYF(0));
return true;
}
return false;
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 74,645,914,368,198,720,000,000,000,000,000,000,000 | 9 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
static RAND_DRBG *rand_drbg_new(int secure,
int type,
unsigned int flags,
RAND_DRBG *parent)
{
RAND_DRBG *drbg = secure ? OPENSSL_secure_zalloc(sizeof(*drbg))
: OPENSSL_zalloc(sizeof(*drbg));... | 1 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 44,075,186,899,749,350,000,000,000,000,000,000,000 | 63 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
static void nfs4_construct_boot_verifier(struct nfs_client *clp,
nfs4_verifier *bootverf)
{
__be32 verf[2];
verf[0] = htonl((u32)clp->cl_boot_time.tv_sec);
verf[1] = htonl((u32)clp->cl_boot_time.tv_nsec);
memcpy(bootverf->data, verf, sizeof(bootverf->data));
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 20e0fa98b751facf9a1101edaefbc19c82616a68 | 235,997,877,466,771,070,000,000,000,000,000,000,000 | 9 | Fix length of buffer copied in __nfs4_get_acl_uncached
_copy_from_pages() used to copy data from the temporary buffer to the
user passed buffer is passed the wrong size parameter when copying
data. res.acl_len contains both the bitmap and acl lenghts while
acl_len contains the acl length after adjusting for the bitmap... |
expand_string_assignment (string, quoted)
char *string;
int quoted;
{
WORD_DESC td;
WORD_LIST *value;
if (string == 0 || *string == '\0')
return ((WORD_LIST *)NULL);
expand_no_split_dollar_star = 1;
td.flags = W_ASSIGNRHS;
td.word = savestring (string);
value = call_expand_word_internal (... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 42,545,427,826,088,610,000,000,000,000,000,000,000 | 30 | bash-4.4-rc2 release |
Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg)
{ return (*ref)->field_transformer_for_having_pushdown(thd, arg); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 76,775,733,365,726,080,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
void SetupClockReferences(GF_ISOFile *file)
{
u32 i, count, ocr_id;
count = gf_isom_get_track_count(file);
if (count==1) return;
ocr_id = 0;
for (i=0; i<count; i++) {
if (!gf_isom_is_track_in_root_od(file, i+1)) continue;
ocr_id = gf_isom_get_track_id(file, i+1);
break;
}
/*doesn't look like MP4*/
if (!oc... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 71,499,075,537,991,280,000,000,000,000,000,000,000 | 22 | fixed #1734 |
xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt)
{
if (vctxt == NULL)
return;
/*
* TODO: Should we clear the flags?
* Might be problematic if one reuses the context
* and assumes that the options remain the same.
*/
vctxt->flags = 0;
vctxt->validationRoot = NULL;
vct... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 178,011,242,198,185,940,000,000,000,000,000,000,000 | 101 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
void gfs2_inplace_release(struct gfs2_inode *ip)
{
struct gfs2_blkreserv *rs = &ip->i_res;
if (rs->rs_rgd_gh.gh_gl)
gfs2_glock_dq_uninit(&rs->rs_rgd_gh);
} | 0 | [
"CWE-416"
] | linux | 36e4ad0316c017d5b271378ed9a1c9a4b77fab5f | 105,167,995,767,382,640,000,000,000,000,000,000,000 | 7 | GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
Before this patch, function read_rindex_entry would set a rgrp
glock's gl_object pointer to itself before inserting the rgrp into
the rgrp rbtree. The problem is: if another process was also reading
the rgrp in, and had already inserted its newly create... |
pch_write_line (lin line, FILE *file)
{
bool after_newline = (p_len[line] > 0) && (p_line[line][p_len[line] - 1] == '\n');
if (! fwrite (p_line[line], sizeof (*p_line[line]), p_len[line], file))
write_fatal ();
return after_newline;
} | 0 | [
"CWE-476"
] | patch | f290f48a621867084884bfff87f8093c15195e6a | 235,425,048,558,255,600,000,000,000,000,000,000,000 | 7 | Fix segfault with mangled rename patch
http://savannah.gnu.org/bugs/?53132
* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
for renames and copies (fix the existing check). |
GF_WebVTTSampleEntryBox *gf_webvtt_isom_get_description(GF_ISOFile *movie, u32 trackNumber, u32 descriptionIndex)
{
GF_WebVTTSampleEntryBox *wvtt;
GF_TrackBox *trak;
if (!descriptionIndex) return NULL;
trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!trak || !trak->Media) return NULL;
switch (trak-... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 328c6d682698fdb9878dbb4f282963d42c538c01 | 315,316,535,165,921,200,000,000,000,000,000,000,000 | 27 | fixed #1756 |
file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf,
size_t nbytes)
{
cdf_info_t info;
cdf_header_t h;
cdf_sat_t sat, ssat;
cdf_stream_t sst, scn;
cdf_dir_t dir;
int i;
const char *expn = "";
const char *corrupt = "corrupt: ";
i... | 0 | [
"CWE-20",
"CWE-119"
] | file | 6d209c1c489457397a5763bca4b28e43aac90391 | 154,387,133,782,090,130,000,000,000,000,000,000,000 | 134 | Apply patches from file-CVE-2012-1571.patch
From Francisco Alonso Espejo:
file < 5.18/git version can be made to crash when checking some
corrupt CDF files (Using an invalid cdf_read_short_sector size)
The problem I found here, is that in most situations (if
h_short_sec_size_p2 > 8) because the blocksiz... |
static void can_can_gw_rcv(struct sk_buff *skb, void *data)
{
struct cgw_job *gwj = (struct cgw_job *)data;
struct can_frame *cf;
struct sk_buff *nskb;
int modidx = 0;
/*
* Do not handle CAN frames routed more than 'max_hops' times.
* In general we should never catch this delimiter which is intended
* to co... | 1 | [
"CWE-787"
] | linux | 0aaa81377c5a01f686bcdb8c7a6929a7bf330c68 | 29,743,452,140,290,140,000,000,000,000,000,000,000 | 90 | can: gw: ensure DLC boundaries after CAN frame modification
Muyu Yu provided a POC where user root with CAP_NET_ADMIN can create a CAN
frame modification rule that makes the data length code a higher value than
the available CAN frame data size. In combination with a configured checksum
calculation where the result is... |
static inline int security_xfrm_policy_clone(struct xfrm_sec_ctx *old, struct xfrm_sec_ctx **new_ctxp)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 290,596,990,536,401,000,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static int link_enter_set_addresses(Link *link) {
Address *ad;
int r;
assert(link);
assert(link->network);
assert(link->state != _LINK_STATE_INVALID);
link_set_state(link, LINK_STATE_SETTING_ADDRESSES);
LIST_FOREACH(addresses, ad, link->network->static_addresse... | 0 | [
"CWE-120"
] | systemd | f5a8c43f39937d97c9ed75e3fe8621945b42b0db | 64,633,953,103,917,750,000,000,000,000,000,000,000 | 142 | networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRout... |
GF_Err gf_isom_truehd_config_new(GF_ISOFile *the_file, u32 trackNumber, char *URLname, char *URNname, u32 format, u32 peak_rate, u32 *outDescriptionIndex)
{
GF_TrackBox *trak;
GF_Err e;
u32 dataRefIndex;
GF_MPEGAudioSampleEntryBox *entry;
GF_SampleDescriptionBox *stsd;
e = CanAccessMovie(the_file, GF_ISOM_OPEN_W... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 328c6d682698fdb9878dbb4f282963d42c538c01 | 99,100,801,111,357,050,000,000,000,000,000,000,000 | 36 | fixed #1756 |
static unsigned php_ifd_get32u(void *Long, int motorola_intel)
{
return (unsigned)php_ifd_get32s(Long, motorola_intel) & 0xffffffff;
} | 0 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 146,148,517,315,848,360,000,000,000,000,000,000,000 | 4 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
static int acm_tty_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct acm *acm = tty->driver_data;
int rv = -ENOIOCTLCMD;
switch (cmd) {
case TIOCMIWAIT:
rv = usb_autopm_get_interface(acm->control);
if (rv < 0) {
rv = -EIO;
break;
}
rv = wait_serial_change(acm, arg);
u... | 0 | [
"CWE-416"
] | linux | c52873e5a1ef72f845526d9f6a50704433f9c625 | 94,640,395,954,543,900,000,000,000,000,000,000,000 | 20 | usb: cdc-acm: make sure a refcount is taken early enough
destroy() will decrement the refcount on the interface, so that
it needs to be taken so early that it never undercounts.
Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)")
Cc: stable <stable@vger.kernel.org>
Reported-and-tested-by: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.